Game Development Community

Weapon change with different holding position Help

by Tim Heldna · in Torque Game Engine · 09/30/2004 (7:48 pm) · 2 replies

I'm after a little help in scripting animations.

what I'm trying to do is have multiple weapon selection, but when changing
weapons a different weapon holding position occurs. e.g different for holding a gun to holding a grenade.
any reference to example script something similar to this would be great.

#1
09/30/2004 (10:18 pm)
In your weaponimage::onMount function (the parent class one), add this:

if (%this.armthread $= "")
      %obj.setArmThread(look);
   else
      %obj.setArmThread(%this.armThread);

Then in your weapon image datablock, add your armThread variable(the name of your animation in your player.cs file).
#2
10/03/2004 (10:51 pm)
Ive added the code into the weapon script and added the animation sequence into the player.cs file but it isnt working. (im still new to the
scripting thing) just need a little more detail.

Where is reads look in the script above I put my animation name in?

thanks