Behavior Question
by JD Scogin · in Torque Game Builder · 08/05/2007 (12:24 pm) · 3 replies
I am using the "Shooter Controls" behavior. When I set the behavior up, I choose which keys will move up, down, left, and right.
The interface is quite good.
Now what I would like to do is have a place where the user can select the keys to do this.
I don't want to rewrite the code of this is possible.
Is there a way to use the behavior interface to allow the user to do this?
Or maybe a routine in the GUI?
I have not been able to figure this out.
Thanks for your help.
Jd
The interface is quite good.
Now what I would like to do is have a place where the user can select the keys to do this.
I don't want to rewrite the code of this is possible.
Is there a way to use the behavior interface to allow the user to do this?
Or maybe a routine in the GUI?
I have not been able to figure this out.
Thanks for your help.
Jd
About the author
#2
I can't seem to figure out how to bind the new keys. I have looked at the ShooterControlsBehavior and
can't figure out how to change the keys that are bound.
Am I going about this all wrong and should just forget about the behavior and write my own routine?
I have been working on this for quite awhile. Has anyone got this working? I am sure I am not the first to want to change the key binding that is set up in the behavior. (hope hope)
08/06/2007 (6:09 pm)
OK I made a control that allows the user to select which key to use for up/down/left/right.I can't seem to figure out how to bind the new keys. I have looked at the ShooterControlsBehavior and
can't figure out how to change the keys that are bound.
Am I going about this all wrong and should just forget about the behavior and write my own routine?
I have been working on this for quite awhile. Has anyone got this working? I am sure I am not the first to want to change the key binding that is set up in the behavior. (hope hope)
#3
That uses the original code but has the additional feature to configure that.
Don't think that using a further behavior will be easier than doing an extended version of the original one. Mainly because you would have to use %this.owner.getBehavior("ShooterControlsBehavior") and so forth ...
Would go the seperate behavior path only if you intend to use the other control behaviors as well, in that case you could check for the present control behavior and modify them accordingly.
08/07/2007 (2:22 am)
I would make a ShootercontrolsBehaviorExThat uses the original code but has the additional feature to configure that.
Don't think that using a further behavior will be easier than doing an extended version of the original one. Mainly because you would have to use %this.owner.getBehavior("ShooterControlsBehavior") and so forth ...
Would go the seperate behavior path only if you intend to use the other control behaviors as well, in that case you could check for the present control behavior and modify them accordingly.
Associate Phillip O'Shea
Violent Tulip
You aren't going to be able to do this without scripting something yourself. It is something you're going to need to do alongside using the GUI builder.
In the GUI builder, you specify what scripts are called when objects are used. These are the scripts that you need to make to update the controls.
It really isn't a difficult task to do.
Phil