Game Development Community

Weapons description in script??

by Donnie Hutson Jr · in Torque 3D Professional · 03/20/2014 (8:18 am) · 3 replies

ok, I have it like this and I get the name of the weapon easy;

%curWeapon = %sourceobject.getMountedImage($WeaponSlot).Item.getName();

however, i'd like to have the description thats already set in my weapons file....

description = "M4a1dx with Advanced Combat Scope";

thanks in advance.....

About the author

Electrical Engineer by trade, Computer geek by night. Still learning and loving every minute.


#1
03/20/2014 (10:22 am)
If the description field is set in the weapons file then just get the field off of the object....
%curWeapon = %sourceobject.getMountedImage($WeaponSlot).Item.description;
Use that to set the text.
#2
03/20/2014 (12:26 pm)
I learned a hundred ways not to do it... lol works perfect, thank you so much Richard!!!
#3
04/22/2014 (10:56 pm)
I get the name of the weapon easy.

Compressed Pc Game
www.intelgamesz.blogspot.com