ArmyOfFrogs
New Member
- Reaction score
- 20
Recently my respawn triggers were working persay, but were ignoring the timer I set on them, and it was causing problems. So I went and made the timer a bit longer, and now it won't work no matter the time.
This sets the position for all units owned by them, seperated by whether they're in a dungeon (only bandit cave at this moment) or not. Then there's seperate respawn for dungeons and non dungeons.
The dungeon one works fine, however. Runs off of if a unit dies, unit type equal to the bandit boss, then selects all units from dungeon start to dungeon end and respawns them. Later on with more dungeons i'll set up a way to differentiate b/w the different dungeons, but that doesn't matter atm Thanks for any help ^^
Trigger:
- Build
- Events
- Map Initialization
- conditions
- actions
- unit group - pick every unit in (units in (playable map area)) and do (Actions)
- loop - actions
- if (all conditions are true) then do (then actions) else do (else actions)
- if - conditions
- (owner of (picked unit)) equal to player 11 (dark green)
- then - actions
- if (all conditions are true) then do (then actions) else do (else actions)
- if - conditions
- or - any conditions are true
- conditions
- (banditcave <gen> contains (triggering unit)) equal to true)
- conditions
- or - any conditions are true
- then actions
- Else actions
- unit - set the custom value of (picked unit) to InitInt
- set InitPos[InitInt] = (Position of (Picked unit))
- set InitInt = (InitInt +1)
- 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)
- loop - actions
- Custom script: call DestroyGroup( getlastcreatedgroup() )
- Set dungeonstart = InitInt
- unit group - pick every unit in (Units in (playable map area)) and do (actions))
- if (all conditions are true) then do (then actions) else do (else actions)
- If - conditions
- or - any (coniditions) are true
- conditions
- (BanditCave <gen> contains (picked unit)) equal to true
- conditions
- or - any (coniditions) are true
- Then - actions
- set InitType[INitInt] = (unit-type of(picked unit))
- set InitPos[InitInt] = (Position of (picked unit))
- Set InitInt = (INitINt + 1)
- Else actions
- If - conditions
- if (all conditions are true) then do (then actions) else do (else actions)
- Set dungeonend = InitInt
- Customscript: call destroygroup( getlastcreatedgroup() )
- set INitInt=0
- unit group - pick every unit in (units in (playable map area)) and do (Actions)
- Events
This sets the position for all units owned by them, seperated by whether they're in a dungeon (only bandit cave at this moment) or not. Then there's seperate respawn for dungeons and non dungeons.
Trigger:
- normal respawn
- Events
- Unit - a unit dies
- Conditions
- Owner of (triggering unit)) equal to player 11 (dark green)
- Actions
- if (all conditions are true) then do (thenactions) else do (else actions)
- if - conditions
- (custom value of (triggering unit)) greater than or equal to 1
- (custom value of (triggering unit)) less than dungeonstart
- then - actions
- countdown timer - start Respawn[(Custom value of (triggering unit))] as a ONe-shot timer that will expire in 71.00 seconds
- Wait until ((remaining time for Respawn[(Custom value of (Triggering unit))]) Equal to 1.00), checking every 1.00 seconds
- Unit - create 1 (unit-type of (triggering unit)) for player 11 (dark green) at InitPos[(custom value of (triggering unit))] facing Default building facing degrees)
- Unit - set the custom value of (last created unit) to (custom value of (triggering unit))
- Else - actions
- if - conditions
- if (all conditions are true) then do (thenactions) else do (else actions)
- Events
The dungeon one works fine, however. Runs off of if a unit dies, unit type equal to the bandit boss, then selects all units from dungeon start to dungeon end and respawns them. Later on with more dungeons i'll set up a way to differentiate b/w the different dungeons, but that doesn't matter atm Thanks for any help ^^