Page 1 of 1

-Invul commmand

Posted: Fri Jul 29, 2011 11:51 am
by OrcSlayer101
In my map i want to have a command where if you type -invul it turns the unit selected invulnerable as a sort of cheat :P. This is what i have so far but dont know what to do
trigger scrn.png
trigger scrn.png (6.5 KiB) Viewed 5166 times

Re: -Invul commmand

Posted: Sat Jul 30, 2011 8:50 am
by 3ICE
In TFT we have access to: Unit group - Units selected by player.
RoC users don't have that in GUI, but we can still use the EnumUnitsSelected() BJ function or the native JASS function GroupEnumUnitsSelected() together with SyncSelections() (SyncSelections always comes first) to get which units are selected by the triggering player. Turning it invulnerable should not be a problem.