Weapon / Item ... finding the Difference
by Badguy · in Torque Game Engine · 09/24/2002 (5:48 am) · 5 replies
In the script ..
how can I tell the Difference between an Item
and a Weapon?
using className house's the old one; Item.
I cant seem to find anything.
any help on this seemingly simple matter would not go unnoticed :)
how can I tell the Difference between an Item
and a Weapon?
using className house's the old one; Item.
I cant seem to find anything.
any help on this seemingly simple matter would not go unnoticed :)
About the author
#2
isWeapon=1;
Or, if you're looking for a specific weapon, e.g. the "Crossbow", use
%obj.getDatablock().getName();
Btw., how are the doors coming along? :p would *love* to see them working completely... :)
09/24/2002 (11:47 am)
yeah, or use some dynamic var in your datablock , e.g.isWeapon=1;
Or, if you're looking for a specific weapon, e.g. the "Crossbow", use
%obj.getDatablock().getName();
Btw., how are the doors coming along? :p would *love* to see them working completely... :)
#3
when I type
what am I doing wrong here?
Stephen :
as for the doors .. I was gonna crack into em last night and start playing .. as it is ive done nothing. :)
but instead im playing with the script getting warmed up.
09/25/2002 (2:32 am)
hmm well indeed that is what I thought but it is like I said the function getClassName for me is returning the Weapon's parent className "Item" and the variable className is returning " " this happens for me on stocker realm warswhen I type
echo((weaponId).getClassName()); or echo((weaponId).className);
what am I doing wrong here?
Stephen :
as for the doors .. I was gonna crack into em last night and start playing .. as it is ive done nothing. :)
but instead im playing with the script getting warmed up.
#5
09/25/2002 (6:51 pm)
ahh i c thanks alot :)
Torque Owner Harold "LabRat" Brown
You have to remember to set the className in the datablock definition for the item to the correct specification.