This is a part of my trigger so I don't post all of it but I think this would be enought:
So I tried to pick every unit in regi[0] and check if the unit is there but no luck. So I created this trigger that doesn't work too. I'll post a creenshot of the unit data cause I can't do anything with this type of units except putting them in unit group as Last Created Unit. They are simply undetectable.
EDIT: Wow. Seems like the problem is in Pause/Unpause triggering unit which causes this trigger to loop infinitely. How does this happen? Is tehre any way to fix it?
The point is that I need when issued order targeting a point the unit to disobey that order and stand still. Then I check for this unit I was talking about if it is close to the point of issued order and I order the unit to move to there. If there is no that kinda unit close to the point of issued order I want the unit to stand still and not move. How can I do that. I tried various ways and non of them worked properly.
Trigger:
- Actions
- Set tmp_bool2 = True
- Unit - Pause (Triggering unit)
- Unit - Unpause (Triggering unit)
- Set tmp_point[0] = (Target point of issued order)
- Set tmp_regi[0] = (Region centered at tmp_point[0] with size (200.00, 200.00))
- Unit Group - Pick every unit in tmp_ugrp[1] and do (Actions)
- Loop - Actions
- Game - Display to (All players) the text: (Name of (Picked unit)) <- works-displays all the units in the unit group as it should be
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (tmp_regi[0] contains (Picked unit)) Equal to True
- Then - Actions
- Game - Display to (All players) the text: ((Name of (Picked unit)) + <-) <- doesn't work and I click really close to the unit even on top of it
- Set tmp_unit[8] = (Picked unit)
- Game - Display to (All players) the text: ((Name of (Picked unit)) + <-) <- doesn't work and I click really close to the unit even on top of it
- Else - Actions
- If - Conditions
- Loop - Actions
So I tried to pick every unit in regi[0] and check if the unit is there but no luck. So I created this trigger that doesn't work too. I'll post a creenshot of the unit data cause I can't do anything with this type of units except putting them in unit group as Last Created Unit. They are simply undetectable.
EDIT: Wow. Seems like the problem is in Pause/Unpause triggering unit which causes this trigger to loop infinitely. How does this happen? Is tehre any way to fix it?
The point is that I need when issued order targeting a point the unit to disobey that order and stand still. Then I check for this unit I was talking about if it is close to the point of issued order and I order the unit to move to there. If there is no that kinda unit close to the point of issued order I want the unit to stand still and not move. How can I do that. I tried various ways and non of them worked properly.