Nureru
New Member
- Reaction score
- 1
Okay, here's my problem. I want it so creeps, when they reach a node, are replaced with a higher level creep, and then are sent to the next node. Here's my triggers:
The order trigger:
The Levelup Trigger:
It almost works, except it levels the creeps up a lot more than it ought to be. It will make some of them level 3, or 4, or 7, instead of just making the level 1 creeps level 2. I assume what it's doing is when the new creep is created, it enters the region for the trigger, and so it runs the trigger again for that creep. Help would be fantastic.
EDIT: Update, I've got it so it's mostly leveling them up to level 2, although sometimes one creep will be leveled to level 3 and I don't know why. However, now it won't tell them where to go properly. It sends all the creeps the same direction, except occasionally one will go the other way. Sometimes they don't even bother moving or leveling up or anything, they just ignore the trigger entirely it seems. This is driving me up the wall.
I'm going to include the map for download, so you can see exactly what is going on. I'd really appreciate help with this.
The order trigger:
Trigger:
- Order Node1
- Events
- Unit - A unit enters Node 1 <gen>
- Conditions
- Or - Any (Conditions) are true
- Conditions
- (Owner of (Entering unit)) Equal to Player 1 (Red)
- (Owner of (Entering unit)) Equal to Player 7 (Green)
- Conditions
- Or - Any (Conditions) are true
- Actions
- Set temp_group = (Units in Node 1 <gen> matching (((Matching unit) is A structure) Equal to True))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- (Unit-type of (Entering unit)) Equal to Wisp (Level 1)
- (Unit-type of (Entering unit)) Equal to Wisp (Level 2)
- (Unit-type of (Entering unit)) Equal to Wisp (Level 3)
- (Unit-type of (Entering unit)) Equal to Wisp (Level 4)
- (Unit-type of (Entering unit)) Equal to Wisp (Level 5)
- (Unit-type of (Entering unit)) Equal to Wisp (Level 6)
- (Unit-type of (Entering unit)) Equal to Wisp (Level 7)
- Conditions
- (Unit-type of (Random unit from temp_group)) Equal to Node (Arcane)
- Or - Any (Conditions) are true
- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- node1switch Equal to True
- Then - Actions
- Set temp_point = (Center of Node 4 <gen>)
- Set temp_unit = (Entering unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Level of Do Not Level for temp_unit) Not equal to 1
- Then - Actions
- Trigger - Run Level Arcane <gen> (checking conditions)
- Unit - Add Do Not Level to temp_unit
- Unit - Set level of Do Not Level for temp_unit to 1
- Else - Actions
- If - Conditions
- Unit - Order temp_unit to Attack-Move To temp_point
- Custom script: call RemoveLocation( udg_temp_point )
- Set node1switch = False
- Else - Actions
- Set temp_point = (Center of Node 3 <gen>)
- Set temp_unit = (Entering unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Level of Do Not Level for temp_unit) Not equal to 1
- Then - Actions
- Trigger - Run Level Arcane <gen> (checking conditions)
- Unit - Add Do Not Level to temp_unit
- Unit - Set level of Do Not Level for temp_unit to 1
- Else - Actions
- If - Conditions
- Unit - Order temp_unit to Attack-Move To temp_point
- Custom script: call RemoveLocation( udg_temp_point )
- Set node1switch = True
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- (Unit-type of (Entering unit)) Equal to Grunt (Level 1)
- (Unit-type of (Entering unit)) Equal to Grunt (Level 2)
- (Unit-type of (Entering unit)) Equal to Grunt (Level 3)
- (Unit-type of (Entering unit)) Equal to Grunt (Level 4)
- (Unit-type of (Entering unit)) Equal to Grunt (Level 5)
- (Unit-type of (Entering unit)) Equal to Grunt (Level 6)
- (Unit-type of (Entering unit)) Equal to Grunt (Level 7)
- Conditions
- (Unit-type of (Random unit from temp_group)) Equal to Node (Fel)
- Or - Any (Conditions) are true
- Then - Actions
- Set temp_point = (Center of Team 1 Base <gen>)
- Set temp_unit = (Entering unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Level of Do Not Level for temp_unit) Not equal to 1
- Then - Actions
- Trigger - Run Level Fel <gen> (checking conditions)
- Unit - Add Do Not Level to temp_unit
- Unit - Set level of Do Not Level for temp_unit to 1
- Else - Actions
- If - Conditions
- Unit - Order temp_unit to Attack-Move To temp_point
- Custom script: call RemoveLocation( udg_temp_point )
- Else - Actions
- If - Conditions
- Custom script: call DestroyGroup( udg_temp_group )
- Events
The Levelup Trigger:
Trigger:
- Level Arcane
- Events
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Unit-type of temp_unit) Equal to Wisp (Level 6)
- Then - Actions
- Set temp_count = (Integer((Percentage life of temp_unit)))
- Set temp_point2 = (Position of temp_unit)
- Unit - Remove temp_unit from the game
- Unit - Create 1 Wisp (Level 7) for Player 1 (Red) at temp_point2 facing Default building facing degrees
- Unit - Set life of (Last created unit) to (Real(temp_count))%
- Set temp_unit = (Last created unit)
- Custom script: call RemoveLocation( udg_temp_point2 )
- Skip remaining actions
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Unit-type of temp_unit) Equal to Wisp (Level 5)
- Then - Actions
- Set temp_count = (Integer((Percentage life of temp_unit)))
- Set temp_point2 = (Position of temp_unit)
- Unit - Remove temp_unit from the game
- Unit - Create 1 Wisp (Level 6) for Player 1 (Red) at temp_point2 facing Default building facing degrees
- Unit - Set life of (Last created unit) to (Real(temp_count))%
- Set temp_unit = (Last created unit)
- Custom script: call RemoveLocation( udg_temp_point2 )
- Skip remaining actions
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Unit-type of temp_unit) Equal to Wisp (Level 4)
- Then - Actions
- Set temp_count = (Integer((Percentage life of temp_unit)))
- Set temp_point2 = (Position of temp_unit)
- Unit - Remove temp_unit from the game
- Unit - Create 1 Wisp (Level 5) for Player 1 (Red) at temp_point2 facing Default building facing degrees
- Unit - Set life of (Last created unit) to (Real(temp_count))%
- Set temp_unit = (Last created unit)
- Custom script: call RemoveLocation( udg_temp_point2 )
- Skip remaining actions
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Unit-type of temp_unit) Equal to Wisp (Level 3)
- Then - Actions
- Set temp_count = (Integer((Percentage life of temp_unit)))
- Set temp_point2 = (Position of temp_unit)
- Unit - Remove temp_unit from the game
- Unit - Create 1 Wisp (Level 4) for Player 1 (Red) at temp_point2 facing Default building facing degrees
- Unit - Set life of (Last created unit) to (Real(temp_count))%
- Set temp_unit = (Last created unit)
- Custom script: call RemoveLocation( udg_temp_point2 )
- Skip remaining actions
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Unit-type of temp_unit) Equal to Wisp (Level 2)
- Then - Actions
- Set temp_count = (Integer((Percentage life of temp_unit)))
- Set temp_point2 = (Position of temp_unit)
- Unit - Remove temp_unit from the game
- Unit - Create 1 Wisp (Level 3) for Player 1 (Red) at temp_point2 facing Default building facing degrees
- Unit - Set life of (Last created unit) to (Real(temp_count))%
- Set temp_unit = (Last created unit)
- Custom script: call RemoveLocation( udg_temp_point2 )
- Skip remaining actions
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Unit-type of temp_unit) Equal to Wisp (Level 1)
- Then - Actions
- Set temp_count = (Integer((Percentage life of temp_unit)))
- Set temp_point2 = (Position of temp_unit)
- Unit - Remove temp_unit from the game
- Unit - Create 1 Wisp (Level 2) for Player 1 (Red) at temp_point2 facing Default building facing degrees
- Unit - Set life of (Last created unit) to (Real(temp_count))%
- Set temp_unit = (Last created unit)
- Custom script: call RemoveLocation( udg_temp_point2 )
- Skip remaining actions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
It almost works, except it levels the creeps up a lot more than it ought to be. It will make some of them level 3, or 4, or 7, instead of just making the level 1 creeps level 2. I assume what it's doing is when the new creep is created, it enters the region for the trigger, and so it runs the trigger again for that creep. Help would be fantastic.
EDIT: Update, I've got it so it's mostly leveling them up to level 2, although sometimes one creep will be leveled to level 3 and I don't know why. However, now it won't tell them where to go properly. It sends all the creeps the same direction, except occasionally one will go the other way. Sometimes they don't even bother moving or leveling up or anything, they just ignore the trigger entirely it seems. This is driving me up the wall.
I'm going to include the map for download, so you can see exactly what is going on. I'd really appreciate help with this.