Game Development Community

Weapon mounting

by Christian · in Torque Game Engine · 01/23/2007 (12:28 am) · 1 replies

I'm having a bit of trouble with mounting a sword. I have in my sword.cs file
datablock ShapeBaseImageData(SwordImage)
{
   shapeFile = "client/data/shapes/weapons/jaggededgedsword.dts";
   emap = true;
   eyeOffset = "0 0 0";
};

and in a spell I have
%caster.mountImage(SwordImage,0);

Anyone point me in the right direction?

#1
01/24/2007 (2:35 am)
Don't know for sure, but here's a few suggestions:

-Try changing the path to your model file to "~data/shapes/weapons/jaggededgedsword.dts"

-Are you sure the script with the SwordImage Datablock is being run? At the top of the script file try adding something like echo("#############Sword script loaded#############"); and check to see if you can see that in the console.

-Generally, check the console for any errors that relate to the sword.

--Amr