- Joined
- Dec 29, 2009
- Messages
- 931
Hey, so I have this part of a trigger I'm using. Loads on map initialization. I don't think this is the problem though.
This however, is a problem.
Obviously this is just something I made to test, but you get the idea. Basically, instead of making 24 different triggers for creating each hero I want to create one and use if/then/else to check and see which hero it is.
The heroes are chosen by moving the "Soul" into a circle of power.
To summarize, I need to be able to check to see which region is being entered. WE doesn't feature a generic "region-entered" event, nor the condition to determine if the region-entered is equal to a specific region.
What I have currently will *sometimes* display the text. I don't quite understand why.
Advice appreciated. Thanks in advance.
-
For each (Integer A) from 0 to 23, do (Actions)
-
Loop - Actions
-
Set tempLoc = (Center of heroSelectionRegion[(Integer A)])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Integer A) Greater than or equal to 0) and ((Integer A) Less than or equal to 5)
-
-
Then - Actions
-
Unit - Create 1 heroSelectionType[(Integer A)] for Neutral Passive at tempLoc facing 270.00 degrees
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Integer A) Greater than or equal to 6) and ((Integer A) Less than or equal to 8)
-
-
Then - Actions
-
Unit - Create 1 heroSelectionType[(Integer A)] for Neutral Passive at tempLoc facing 180.00 degrees
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Integer A) Greater than or equal to 9) and ((Integer A) Less than or equal to 14)
-
-
Then - Actions
-
Unit - Create 1 heroSelectionType[(Integer A)] for Neutral Passive at tempLoc facing 270.00 degrees
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Integer A) Greater than or equal to 15) and ((Integer A) Less than or equal to 17)
-
-
Then - Actions
-
Unit - Create 1 heroSelectionType[(Integer A)] for Neutral Passive at tempLoc facing 270.00 degrees
-
-
Else - Actions
-
-
Custom script: call RemoveLocation( udg_tempLoc )
-
Trigger - Add to Selection <gen> the event (Unit - A unit enters heroSelectionRegion[(Integer A)])
-
-
-
Selection
-
Events
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Soul
-
-
Actions
-
For each (Integer A) from 0 to 23, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(heroSelectionRegion[(Integer A)] contains (Triggering unit)) Equal to True
-
-
Then - Actions
-
Game - Display to (Player group((Owner of (Triggering unit)))) for 1.00 seconds the text: ((Soul owned by + ((Name of (Owner of (Triggering unit))) + is located in region )) + ((String((Integer A))) + .))
-
-
Else - Actions
-
-
-
-
-
The heroes are chosen by moving the "Soul" into a circle of power.
To summarize, I need to be able to check to see which region is being entered. WE doesn't feature a generic "region-entered" event, nor the condition to determine if the region-entered is equal to a specific region.
What I have currently will *sometimes* display the text. I don't quite understand why.
Advice appreciated. Thanks in advance.