Game Development Community

Minigun/Chaingun firing proplem

by Kimberly Unger · in Torque Game Engine · 03/11/2004 (2:21 pm) · 8 replies

I used the Chaingun example to make a minigun that is used by our Bots. Everything works fine except the minigun just keeps spiningup and spiningdown with out firing. What I want to happen is that once the target enters the Bots LOS for it to start and keep fireing untill the target leaves the LOS.

After some carefull checking I found out that what is happening is that the trigger that is set by setImageTrigger(0,true) is getting reset before I call the setImageTrigger(0,false).

So How do I get the trigger to set and stay set?

Beau
Kim's programmer.

#1
03/11/2004 (2:38 pm)
Beau, I am no help to you unfortunatly, but I did get curious, the Chaingun Example ?? is this something official that I missed ??

Regards, Jorgen
#2
03/11/2004 (2:57 pm)
I Jorgen;

Sorry about that, the Cahingun was taken from Tribes 2.
#3
03/11/2004 (11:18 pm)
Aah, cool.
Well, hopefully someone that do know will check in sooner rather than later on this one ...

Did you get the Chaingun fireing when using it yourself (a non-bot player)?
#4
03/11/2004 (11:49 pm)
Just have a trouble with this minigun?
#5
03/12/2004 (6:49 am)
I was able to get the gun to fire when I didn't use the SpinUp/SpinDown sequance. It still has the problem of the trigger stat being reset before the setImageTrigger(0,false) is called. I really need to have a way to keep the trigger state set to 'fire' untill I want to reset it.
#6
03/22/2004 (12:44 am)
That could be something that is modified in Tribes 2.. I dunno.
#7
03/22/2004 (6:50 pm)
If what the bot is targeting is actually going out of LOS just long enough to trigger whatever code stops the bot from firing, it would have the effect you describe. The code runs in discreet time slices, so the target could be lined up right so that the bot fires at it, then 64 miliseconds later it may have moved out of LOS so the bot stops shooting, another 64MS and it's back. That could be what's happening (depending on how your triggering mechanisms work) You may need to extend the amount of time a bot will continue firing before it gives up on targets that have left it's LOS.
#8
03/24/2004 (12:23 pm)
You'll have to change the way the Bots fire so that it stays true until the target is out of LOS.