Game Development Community

Multiple guns at once, with multiple rounds

by Tom · in Torque Game Engine · 07/14/2007 (2:08 pm) · 3 replies

Hi everybody

alright, so, i made this airplaine type of model, that the character can mount.

so, idk if u know what i mean but i want that model to have 6 machine guns (3 per wing)

and when the player presses the mouse button, all 6 guns fire at the same time.

furthermore, if its possible, i want that one press = 10 rounds per gun will be released (one bullet after each other), so that basically a line of 10 bullets appear (similar to the shotgun, but one after each other not all at once)

id prefer to script this, and not mod the engine... but i am willing to if someone knows how (then this would continue int he private sdk forum)..

but yeah, any hints clues, or suggestions are greatly appreciated, plus i think its something that newcommers would also like to know so it will benefit the community:)

thanks in advance

-tom-

#1
07/14/2007 (9:41 pm)
This is possible in script. If you search my profile and look under the resources I have submitted you will see a helicopter resource. In this resource I have a helicopter with three weapons mounted, two miniguns that fire with the left mouse button and a rocket launcher that fires with the right. Check my scripts for an example on how to get started.
#2
07/15/2007 (5:57 am)
And to let it fire 10 rounds per click, you should build the statemachine to be semi-automatic, as they say, like a pistol, (using triggerUp and triggerDown) (so that it records ONE click, not time pressed). and then either in the onFire function have it create 10 bullets (simultaniously or with breaks whichever you like best) or you could have one click call the onFire function 10 times through the statemachine i think. id prefer the first option though.
#3
07/15/2007 (6:09 am)
Alright thank you for the resource and the advice:) i will try this asap thanks