Game Development Community

Problems with Firing from different weapons

by a.johnson465 · in Torque Game Engine · 10/28/2009 (7:38 pm) · 1 replies

Previously, I've had some trouble with having a character with more than 1 mount for weapons, but the weapons will only fire from mount0.

The setup is, the character has mount0 in his chest and mount1 in the hand. This is to cheat a melee attack by having an invisible gun firing an invisible bullet from mount0. And when I switch weapons to a gun in the hand at mount1, it wouldn't fire. I worked around this by having 2 separate dts files, one for the melee weapon and one for the ranged weapon.

So now, I am making a boss character in another game that will need 3 mount points, one in the chest for cheating melee attacks, one in the hand, and one in the mouth for a spitting fireball attack. I am setting up the AI to shoot from certain weapons at certain times when the proper function is called, but I am worried that my previous problem will occur with weapons firing from mount0.

Is there something I am missing? Or is there a work around?

Thanks.

#1
10/28/2009 (8:19 pm)
The AI firing should work - you just call setImageTriggerState with the appropriate slot. But as far as I remember, Players are set up to only use one image lot to fire from. You might want to look up some dual-wielding resources here to see how people have gotten around this, unless you're happy with the way you've done it.