- Joined
- Jan 31, 2010
- Messages
- 3,552
Alright, so I've been thinking this through for some time and I can't quite figure out where I'm wrong. I've ran around and about the trigger for half an hour and I can't see where I'm making a mistake, so I've decided to ask for help.
What this trigger is supposed to do, is when a character is selected by training it, to order other three character selection buildings to train the same character and then remove all but the original, allowing me to use the disabled icon borders to show who is picked already, rather than removing the character completely and leaving a black space behind. What this does in theory, is removing the original char and keeping all others, which is weird. I've tried to do this via tempCheck boolean variable, but it doesn't seem effective.
Any helpful thoughts?
What this trigger is supposed to do, is when a character is selected by training it, to order other three character selection buildings to train the same character and then remove all but the original, allowing me to use the disabled icon borders to show who is picked already, rather than removing the character completely and leaving a black space behind. What this does in theory, is removing the original char and keeping all others, which is weird. I've tried to do this via tempCheck boolean variable, but it doesn't seem effective.
Any helpful thoughts?
-
Char Selection
-
Events
-
Unit - A unit enters Region 050 <gen>
-
-
Conditions
-
(Unit-type of (Entering unit)) Not equal to Select Your Character!
-
(Owner of (Triggering unit)) Not equal to Neutral Hostile
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
tempCheck Equal to True
-
-
Then - Actions
-
Unit - Remove (Triggering unit) from the game
-
Set tempPoint = (Position of (Entering unit))
-
Set tempGroup = (Units within 700.00 of tempPoint matching ((Unit-type of (Matching unit)) Not equal to Select Your Character!))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in tempGroup) Equal to 0
-
-
Then - Actions
-
Set tempCheck = False
-
-
Else - Actions
-
-
Custom script: call RemoveLocation (udg_tempPoint)
-
Custom script: call DestroyGroup (udg_tempGroup)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Entering unit)) Equal to Player 1 (Red)
-
CharacterSelected[1] Equal to False
-
tempCheck Equal to False
-
-
Then - Actions
-
Unit - Remove Select Your Character! 0181 <gen> from the game
-
Player - Limit training of Heroes to 0 for (Owner of (Entering unit))
-
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Entering unit))) + ( has chosen the + ((Name of (Entering unit)) + |r!)))
-
Set CharacterSelected[1] = True
-
Set tempCheck = True
-
Set tempPoint = (Position of (Entering unit))
-
Set tempGroup = (Units within 700.00 of tempPoint matching ((Unit-type of (Matching unit)) Equal to Select Your Character!))
-
Unit Group - Pick every unit in tempGroup and do (Actions)
-
Loop - Actions
-
Unit - Order (Picked unit) to train/upgrade to a (Unit-type of (Entering unit))
-
-
-
Custom script: call RemoveLocation (udg_tempPoint)
-
Custom script: call DestroyGroup (udg_tempGroup)
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Entering unit)) Equal to Player 2 (Blue)
-
CharacterSelected[2] Equal to False
-
-
Then - Actions
-
Unit - Remove Select Your Character! 0177 <gen> from the game
-
Player - Limit training of Heroes to 0 for (Owner of (Entering unit))
-
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Entering unit))) + ( has chosen the + ((Name of (Entering unit)) + |r!)))
-
Set CharacterSelected[2] = True
-
Set tempCheck = True
-
Set tempPoint = (Position of (Entering unit))
-
Set tempGroup = (Units within 700.00 of tempPoint matching ((Unit-type of (Matching unit)) Equal to Select Your Character!))
-
Unit Group - Pick every unit in tempGroup and do (Actions)
-
Loop - Actions
-
Unit - Order (Picked unit) to train/upgrade to a (Unit-type of (Entering unit))
-
-
-
Custom script: call RemoveLocation (udg_tempPoint)
-
Custom script: call DestroyGroup (udg_tempGroup)
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Entering unit)) Equal to Player 3 (Teal)
-
CharacterSelected[3] Equal to False
-
-
Then - Actions
-
Unit - Remove Select Your Character! 0180 <gen> from the game
-
Player - Limit training of Heroes to 0 for (Owner of (Entering unit))
-
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Entering unit))) + ( has chosen the + ((Name of (Entering unit)) + |r!)))
-
Set CharacterSelected[3] = True
-
Set tempCheck = True
-
Set tempPoint = (Position of (Entering unit))
-
Set tempGroup = (Units within 700.00 of tempPoint matching ((Unit-type of (Matching unit)) Equal to Select Your Character!))
-
Unit Group - Pick every unit in tempGroup and do (Actions)
-
Loop - Actions
-
Unit - Order (Picked unit) to train/upgrade to a (Unit-type of (Entering unit))
-
-
-
Custom script: call RemoveLocation (udg_tempPoint)
-
Custom script: call DestroyGroup (udg_tempGroup)
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Entering unit)) Equal to Player 4 (Purple)
-
CharacterSelected[4] Equal to False
-
-
Then - Actions
-
Unit - Remove Select Your Character! 0178 <gen> from the game
-
Player - Limit training of Heroes to 0 for (Owner of (Entering unit))
-
Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Entering unit))) + ( has chosen the + ((Name of (Entering unit)) + |r!)))
-
Set CharacterSelected[4] = True
-
Set tempCheck = True
-
Set tempPoint = (Position of (Entering unit))
-
Set tempGroup = (Units within 700.00 of tempPoint matching ((Unit-type of (Matching unit)) Equal to Select Your Character!))
-
Unit Group - Pick every unit in tempGroup and do (Actions)
-
Loop - Actions
-
Unit - Order (Picked unit) to train/upgrade to a (Unit-type of (Entering unit))
-
-
-
Custom script: call RemoveLocation (udg_tempPoint)
-
Custom script: call DestroyGroup (udg_tempGroup)
-
-
Else - Actions
-
-
-
-
-
-
-
-
Selection - Select (Entering unit) for (Owner of (Entering unit))
-
For each (Integer A) from 1 to 24, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Entering unit)) Equal to HeroVariables[(Integer A)]
-
-
Then - Actions
-
Unit - Change ownership of HeroSkillShrines[(Integer A)] to (Owner of (Entering unit)) and Change color
-
-
Else - Actions
-
-
-
-
-