Mounting shape to a weapon
by Mark Cooper · in Torque Game Engine · 12/04/2006 (5:51 am) · 4 replies
Hi
Ive been trying to mount a shape to a weapon because my game has interchangeable equipment for each gun (scope, silencer, grenade launcher etc.)
so far Ive had no luck, all it does it mount the shape onto the player and removed the weapon
but i want to mount it onto the weapon, i setup mount points on the weapon etc
anybody got any ideas on how this can be done? preferably using just script
Thanks
Ive been trying to mount a shape to a weapon because my game has interchangeable equipment for each gun (scope, silencer, grenade launcher etc.)
so far Ive had no luck, all it does it mount the shape onto the player and removed the weapon
but i want to mount it onto the weapon, i setup mount points on the weapon etc
anybody got any ideas on how this can be done? preferably using just script
Thanks
About the author
#2
plus i would want to periodically release new devices to attach
I'm not much of a programmer so all those changes to the code seem out of my league
thanks for your input
12/04/2006 (6:51 am)
I thought the same thing about separate meshes, there will be so many different combinationsplus i would want to periodically release new devices to attach
I'm not much of a programmer so all those changes to the code seem out of my league
thanks for your input
#3
12/04/2006 (7:35 am)
There's a resource or a thread floating around that allows you to mount objects to a ShapeBaseImage somewhere. I remember playing with it about a year ago, I can't remember how well it worked though.
#4
12/04/2006 (7:44 am)
I haven't seen it, any chance of a link?
Torque Owner Brian Hill
If you redid the weapon code to mount weapons as ShapeBase objects instead, then you could probably mount the equipment onto the weapons as ShapeBaseImages. You'd have to change how the firing code worked, though. Probably the aiming code, too. And definitely the mounting code.
That's the best I can come up with, short of having separate meshes for each possible combination (rifle, rifle w/scope, rifle w/launcher, etc...). That wouldn't take any modifications, but seems very wasteful.