Multiple muzzlePoints
by Leo "kingDUCTtape" Altmann · in Torque Game Engine · 02/06/2005 (10:26 pm) · 5 replies
Hello,
This question is purely theoretical, and I have not yet looked through the code, but i was wondering if it was possible to have multiple muzzlePoints on a single weapon? The idea here is a missle pod type weapon, that would look a little odd if all the missiles came from one point on the pod :D I imagine the script would just cycle through the different points to fire the projectiles in a more realistic fashon. So, is this possible with just scripting and adding the points to the model, or would I have to modify the engine source to accomodate it?
This question is purely theoretical, and I have not yet looked through the code, but i was wondering if it was possible to have multiple muzzlePoints on a single weapon? The idea here is a missle pod type weapon, that would look a little odd if all the missiles came from one point on the pod :D I imagine the script would just cycle through the different points to fire the projectiles in a more realistic fashon. So, is this possible with just scripting and adding the points to the model, or would I have to modify the engine source to accomodate it?
About the author
#2
I would say that you would need to modify the engine source. I've had a bit of exposure to the weapon state code, and I've never seen anything referring to multiple muzzlepoints.
My suggestion would be to add this to the weapon states. In other words, have each state specify what muzzlepoint to use. I'm not sure how easy this will be, but that's the general idea, in theory.
EDIT: spelling, bah
02/06/2005 (11:00 pm)
I've thought about this problem before. The ol' "fusion cutter" from Dark Forces (if anyone even remembers that pretty forgettable game) is a good example of a gun that would need multiple muzzlepoints.I would say that you would need to modify the engine source. I've had a bit of exposure to the weapon state code, and I've never seen anything referring to multiple muzzlepoints.
My suggestion would be to add this to the weapon states. In other words, have each state specify what muzzlepoint to use. I'm not sure how easy this will be, but that's the general idea, in theory.
EDIT: spelling, bah
#3
@Alex S.
How would one go about specifying these offsets? Can you specify in the script where in relation to the muzzlePoint the projectile is actually created?
02/07/2005 (6:10 pm)
Thanks for your help guys!@Alex S.
How would one go about specifying these offsets? Can you specify in the script where in relation to the muzzlePoint the projectile is actually created?
#4
02/07/2005 (6:22 pm)
When spawning the new projectiles, initionPosition = VectorAdd(%obj.getMuzzlePoint(%slot), "x y z");where x, y, and z are your x, y, and z offsets. It's a hackey solution, but it works. In theory at least.
#5
02/07/2005 (6:38 pm)
In Lore, I used some hard coded script for our multi-fire weapons. The muzzle flash is off of course, but that was the best choice at the time.
Associate Alex Scarborough