• Pac's companion.
    5 replies, posted
Don't know if this is the right forum but move it if it isn't. Ok so this is a little tutorial on setting up my little Companion as I call it. It's a hovercraft completely made of E2. I have something similar just a hella lot better in a contraption I'll post soon, a VTOL. But here's something for you simple guys that you can use when you are bored! :D [code]@name Pac's companion @inputs Pod:wirelink @persist W A S D E:entity Ground:vector Dir:vector Vel:vector Mov:vector Acc runOnTick(1) if (first()) { soundPlay(1, 0, "ambient/machines/machine2.wav") } soundPitch(1, abs(Vel:y()/100)+80) E = entity() W = Pod:number("W") A = Pod:number("A") S = Pod:number("S") D = Pod:number("D") Dir = E:right():setZ(0) Ground = rangerOffset(10000, E:pos(), vec(0, 0, -1)):position() Vel = E:velL() Mov = E:forward()*Vel:x()/5 + vec(0, 0, E:vel():z()) - E:right()*Vel:y()/20 Acc = clamp((W | S ? Acc+(S-W)*150 : Acc-(Acc/20)), -4000+(A | D)*1000, 1000) applyForce((Ground+vec(0, 0, 40)-E:pos())*500-Mov*50+Dir*Acc) applyAngForce(angnorm(-E:angles()+ang(-E:angVel():yaw()*Vel:y()/3500, 0, 0)-E:angVel()/7):setYaw(-E:angVel():yaw()/20+(A-D)*3)*700) [/code] So that's the E2 code. Not too hard to understand if you know what you're dealing with. Now, the tutorial on how to set it up: 1) First of all we're gonna get the prop the hovercraft will use (Best with this prop), you do this by typing [code]wire_expression2_model models/hunter/plates/plate1x2.mdl[/code] in your console. 2) Copy-Paste the code from above and put it into an Expression2! 3) Spawn the E2 :D [b]Wiring it up![/b] Wiring has been done as simple as possible. Only one wire is required to be correct. Thanks to wirelink! 1) Ok now, spawn a seat and an Advanced-Pod-Controller. 2) Link the Pod controller to the seat/chair. 3) Shoot the Advanced-Pod-Controller with the Expression2-wirelink tool! 4) Wire the "Pod [WIRELINK]" input on the E2 to the Advanced-Pod-Controller's [WIRELINK] output. 5) Enjoy! [b]Also! I [b]recommend[/b] that you turn gravity OFF of the seat AND Adv-Pod-Controller![/b] This is how it should look like (The plate is E2, red thing is the Adv-Pod-Controller): [img]http://img200.imageshack.us/img200/144/gmflatgrass0000.jpg[/img] This E2 includes sounds, cool movement and is just pure awesome when bored :D Your only controls are simple as well! Just W, A, S and D! If you have problems setting it up then try again and if that fails, make a reply to this thread!
I'd like to see a vid on how Well it works before bothering with the whole setup here. Perhaps someone will be bothered, however, and vouch for it.
The thing is just I hate making vids but I'll maybe make one... Maybe... But really, it took me 30 seconds to set up.
I can imagine it took you around 30 seconds. But what I want to know is how well it works.
[QUOTE]I can imagine it took you around 30 seconds. But what I want to know is how well it works. [/QUOTE] I agree
Let this piece of shit die, please.
Sorry, you need to Log In to post a reply to this thread.