View Single Post
Old 04-24-2013, 11:52 PM   #8

Pidgeoni's Avatar
Join Date: Jul 2009
Posts: 1,734
Thanks: 185
Thanked 317 Times in 190 Posts

There is that function: GetNPCProperty
Eg: echo #GetNPCProperty(eyebolt_1,type)# >>> Eyebolt

Should be usable in ui with smthing like:
ontrigger="Cmd('Set bla #GetNPCProperty(' # MultiSelectIndex{index} # ',type)#'); SetVisible(!StringEquals(bla,'Dummy'));"
Not sure how it would work with many selections, you might need to define many variables instead of one, eg: bla{index} instead of just bla.

Another option would be to take a dummy state, eg State_BehemothToughSkin, set intaglibility, dispellability etc, then apply to all dummies when you spawn them. That way, you could make commanders unable to select dummies in the first place.

Ow, and your original code should work if you spawn your npcs like this:
SpawnEntityAtEntity #target# NPC_Critter definition /npcs/dummy/dummy.npc name Dummy team 0
Note the "name" parameter. Then you could play more with the code if you don't like all dummies having the same name ^^

Hope i helped ^^

Last edited by Pidgeoni; 04-24-2013 at 11:59 PM.
Pidgeoni is offline   Reply With Quote