- Joined
- Feb 3, 2009
- Messages
- 3,292
In the bellow trigger (the event is added on map ini (any player writes -f as substring).
It works fine, but if a player uses it while he has no units selected then the whole game freezes or random strange bugs occur. I'm sure checking for if group is empty won't work due to some of the errors I saw till now...
How would I fix it?
It works fine, but if a player uses it while he has no units selected then the whole game freezes or random strange bugs occur. I'm sure checking for if group is empty won't work due to some of the errors I saw till now...
How would I fix it?
-
Set Facing
- Events
- Conditions
-
Actions
- Set TempInt = (Integer((Substring((Entered chat string), 3, 8))))
-
Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- (Titan Palace <gen> contains (Picked unit)) Equal to False
- (Owner of (Picked unit)) Equal to (Triggering player)
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- Custom script: call SetImmovableUnitFacing(GetEnumUnit(), udg_TempInt)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call DestroyGroup(bj_lastCreatedGroup)