OnFire loop
by Wolfgang Kurz · in Torque Game Engine · 05/03/2007 (9:28 am) · 2 replies
Hello everyone,
I created a projectile and it has a onFire function of course which gets called when the client uses the mTriggerCount0 Global.
All i do on the Client is:
On a left click of the mouse i do mTriggerCount0++
but then the onfire Function gets called in a loop until i press the left mousebutton again
shouldnt it only get called once?
am i missing something?
i am confused
would be awsome if anyone had any hints for me
I created a projectile and it has a onFire function of course which gets called when the client uses the mTriggerCount0 Global.
All i do on the Client is:
On a left click of the mouse i do mTriggerCount0++
but then the onfire Function gets called in a loop until i press the left mousebutton again
shouldnt it only get called once?
am i missing something?
i am confused
would be awsome if anyone had any hints for me
#2
05/03/2007 (10:20 am)
You also want to check your weapon's script state machine to make sure that there is a transition out of the fire state--it's possible that you never leave the fire state, giving you a continuously firing weapon.
Torque Owner Caleb
Default Studio Name
function mouseFire() { $mvTriggerCount0++; }And call this function when your key is pressed.Hope this makes some sense.