[b]Please disregard this- I've figured it out by now.[/b]
Help with the following E2 would be immensely appreciated.
The E2 in question is for an airplane with controllable throttle and an engine that can be toggled on or off, all controlled by an Adv. Pod Controller.
My main issue is finding a way to make things toggle, namely the propeller and accompanying sound-emitter, and making it so the thrusters only function when the "engine" is "on". (For instance: when you enter the plane, pressing spacebar (throttle up) does nothing; after pressing R and starting the engine, it raises the throttle; R need not be held down to keep the engine on).
A rough diagram for the desired setup has been provided:
[IMG]http://i109.photobucket.com/albums/n48/Csp499/e2diagram.jpg?t=1290934644[/IMG]
Below follows the E2 code I have thus far, controlling the force of thrusters to propel the plane.
[code]@name Throttle
@inputs Accel Decel
@outputs Thruster
@persist
@trigger
if(Accel)
{
Thruster+=10
}
if(Decel)
{
Thruster-=10
}
[/code]
You"ll need to use a button of some kind
I can tell you how but do you prefer wirelink or inputs for each one?
Oh and are you using a sound emmiter, playing from the entity or the E2, and do you want the thrusters to reset to zero when you turn them off so when you turn them back on you wont go shooting off
[editline]28th November 2010[/editline]
[code]
@name Throttle
@inputs Accel Decel R
@outputs Thruster Spin Play
@persist On
@trigger
if(Accel & On)
{
Thruster+=10
}
if(Decel & On)
{
Thruster-=10
}
if(changed(R) & R & !On)
{
Play=1
On=1
}
if(changed(R) & R & On)
{
Play=0
Spin=0
On=0
}
if(On)
{
Spin=1
}
[/code]
Here it is, I tried to match what you want with the information I had, and also matched your coding style even though I don't like that kind XD.
[QUOTE=flasbang73;26358695]I can tell you how but do you prefer wirelink or inputs for each one?
Oh and are you using a sound emmiter, playing from the entity or the E2, and do you want the thrusters to reset to zero when you turn them off so when you turn them back on you wont go shooting off
[editline]28th November 2010[/editline]
[code]Stuff[/code]
Here it is, I tried to match what you want with the information I had, and also matched your coding style even though I don't like that kind XD.[/QUOTE]
Much appreciated, but I've since figured it out.
Thanks a ton anyway.
Sorry, you need to Log In to post a reply to this thread.