I’m trying to set a variable for the current selected subtool. But I’m not able to get it to work. I want the script to go through every subtool and check whether it’s visible or not.
The following zscript is my attempt at storing the subtool name.
[Loop,1024,
[VarSet,SubToolTitle,[IgetTitle, Tool:Current Tool]]
[If,[IModGet,Tool:SubTool,SubToolTitle] >= 7,
[IColorSet,255,0,0] //Red Debug Color
,
[IColorSet,0,255,0] //Green Debug COlor
]
[If,[IsEnabled,Tool:SubTool:SelectDown],
[IPress, Tool:SubTool:SelectDown]
,//else no select down so end of subtools & exit
[LoopExit]
]//end if
]//end loop
This however works with the DemoSoldier_1:
[Loop,1024,
[If,[IModGet,Tool:SubTool:DemoSoldier_1] >= 7,
[IColorSet,255,0,0] //Red Debug Color
,
[IColorSet,0,255,0] //Green Debug COlor
]
[If,[IsEnabled,Tool:SubTool:SelectDown],
[IPress, Tool:SubTool:SelectDown]
,//else no select down so end of subtools & exit
[LoopExit]
]//end if
]//end loop
I think I’m slimpy failing at trying to replace “DemoSoldier_1” with a variable.
Any ideas?
Thanks!