- Joined
- Mar 16, 2008
- Messages
- 1,013
Having a weird problem where some Treasure Chests are stuck at invulnerable even though the creep camp dies. Seems to work after later respawns "refresh" the creep camp. Seems inconsistent and I'm not sure why but Treasure Chests are staying invulnerable. Sorry it's a bit of a mess and not commented. Hope it makes sense.
There are supposed to be 15 creep camps with Treasure Chests. The Chests are invulerable until the camp is cleared (group only has 1 left which is the chest) then the chest should be unlocked (made vulnerable).
There are supposed to be 15 creep camps with Treasure Chests. The Chests are invulerable until the camp is cleared (group only has 1 left which is the chest) then the chest should be unlocked (made vulnerable).
-
Init Respawn Creeps
-

Events
-


Time - Elapsed game time is 1.00 seconds
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in (Units in Main Map Region <gen> owned by Neutral Hostile) and do (Actions)
-



Loop - Actions
-




Set VariableSet creep_picked_unit = (Picked unit)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Level of Mark of No Rez Creep (class) for creep_picked_unit) Not equal to 1
-
-





Then - Actions
-






-------- increment counter --------
-






Set VariableSet creep_counter = (creep_counter + 1)
-






-------- unit --------
-






Set VariableSet creep_array[creep_counter] = creep_picked_unit
-






-------- point of unit --------
-






Set VariableSet creep_point[creep_counter] = (Position of creep_picked_unit)
-






-------- unit facing --------
-






Set VariableSet creep_real[creep_counter] = (Facing of creep_picked_unit)
-






-------- unit type --------
-






Set VariableSet creep_type[creep_counter] = (Unit-type of creep_picked_unit)
-
-





Else - Actions
-
-
-
-
-
-
Loot Creep Dies
-

Events
-


Unit - A unit owned by Neutral Hostile Dies
-
-

Conditions
-


(Level of Treasure Aura (Neutral Hostile) for (Dying unit)) Equal to 1
-
-

Actions
-


Set VariableSet creep_dying = (Dying unit)
-


For each (Integer creep_C_integer) from 1 to 15, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(creep_dying is in creep_camp_groups[creep_C_integer].) Equal to True
-
-





Then - Actions
-






Unit Group - Remove creep_dying from creep_camp_groups[creep_C_integer].
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Number of units in creep_camp_groups[creep_C_integer]) Less than or equal to 1
-
-







Then - Actions
-








Unit - Remove Invulnerable (treasure) from creep_chest[creep_C_integer]
-








Set VariableSet temp_loot_pt = (Position of creep_chest[creep_C_integer])
-








Special Effect - Create a special effect at temp_loot_pt using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdx
-








Special Effect - Destroy (Last created special effect)
-








Custom script: call RemoveLocation(udg_temp_loot_pt)
-
-







Else - Actions
-
-
-





Else - Actions
-
-
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Level of Mark of Original Loot Chest (class) for creep_dying) Equal to 1
-
-



Then - Actions
-




Set VariableSet original_treasure_counter = (original_treasure_counter + 1)
-




Set VariableSet creep_chest_counter = (creep_chest_counter + 1)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






creep_chest_counter Equal to 30
-






(Update Loot Vars A <gen> is on) Equal to True
-
-





Then - Actions
-






Trigger - Run Update Loot Vars A <gen> (checking conditions)
-
-





Else - Actions
-
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






creep_chest_counter Equal to 70
-






(Update Loot Vars B <gen> is on) Equal to True
-
-





Then - Actions
-






Trigger - Run Update Loot Vars B <gen> (checking conditions)
-
-





Else - Actions
-
-




Unit Group - Add creep_dying to chest_group
-




Countdown Timer - Pause chest_clean_timer
-




Countdown Timer - Start chest_clean_timer as a One-shot timer that will expire in 1.00 seconds
-
-



Else - Actions
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Level of Mark of New Loot Chest (class) for creep_dying) Equal to 1
-
-



Then - Actions
-




Set VariableSet creep_chest_counter = (creep_chest_counter + 1)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






creep_chest_counter Equal to 30
-






(Update Loot Vars A <gen> is on) Equal to True
-
-





Then - Actions
-






Trigger - Run Update Loot Vars A <gen> (checking conditions)
-
-





Else - Actions
-
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






creep_chest_counter Equal to 70
-






(Update Loot Vars B <gen> is on) Equal to True
-
-





Then - Actions
-






Trigger - Run Update Loot Vars B <gen> (checking conditions)
-
-





Else - Actions
-
-




Set VariableSet loot_spawn_pt = (Position of creep_dying)
-




Unit - Remove creep_dying from the game
-




Set VariableSet creep_dying = No unit
-




Set VariableSet loot_ran_num = (Random integer number between 1 and 24)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






loot_ran_num Greater than 19
-
-





Then - Actions
-






Set VariableSet loot_ran_num = (Random integer number between 1 and 4)
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








loot_ran_num Equal to 1
-








(C'thun (Old God) 2423 <gen> is alive) Equal to True
-
-







Then - Actions
-








Item - Create Old God Rune: C'thuun at loot_spawn_pt
-








Custom script: call RemoveLocation(udg_loot_spawn_pt)
-








Skip remaining actions
-
-







Else - Actions
-








Set VariableSet loot_ran_num = (Random integer number between 1 and 19)
-








Item - Create loot_spawn_types[loot_ran_num] at loot_spawn_pt
-








Custom script: call RemoveLocation(udg_loot_spawn_pt)
-








Skip remaining actions
-
-
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








loot_ran_num Equal to 2
-








(Yogg-Saron (Old God) 2424 <gen> is alive) Equal to True
-
-







Then - Actions
-








Item - Create Old God Rune: Yogg-saron at loot_spawn_pt
-








Custom script: call RemoveLocation(udg_loot_spawn_pt)
-








Skip remaining actions
-
-







Else - Actions
-








Set VariableSet loot_ran_num = (Random integer number between 1 and 19)
-








Item - Create loot_spawn_types[loot_ran_num] at loot_spawn_pt
-








Custom script: call RemoveLocation(udg_loot_spawn_pt)
-








Skip remaining actions
-
-
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








loot_ran_num Equal to 3
-








(N'zoth (Old God) 2425 <gen> is alive) Equal to True
-
-







Then - Actions
-








Item - Create Old God Rune: N'zoth at loot_spawn_pt
-








Custom script: call RemoveLocation(udg_loot_spawn_pt)
-








Skip remaining actions
-
-







Else - Actions
-








Set VariableSet loot_ran_num = (Random integer number between 1 and 19)
-








Item - Create loot_spawn_types[loot_ran_num] at loot_spawn_pt
-








Custom script: call RemoveLocation(udg_loot_spawn_pt)
-








Skip remaining actions
-
-
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








loot_ran_num Equal to 4
-








(Algalon the Observer (Old God) 2426 <gen> is alive) Equal to True
-
-







Then - Actions
-








Item - Create Prison Portal Rune: Algalon at loot_spawn_pt
-








Custom script: call RemoveLocation(udg_loot_spawn_pt)
-








Skip remaining actions
-
-







Else - Actions
-








Set VariableSet loot_ran_num = (Random integer number between 1 and 19)
-








Item - Create loot_spawn_types[loot_ran_num] at loot_spawn_pt
-








Custom script: call RemoveLocation(udg_loot_spawn_pt)
-








Skip remaining actions
-
-
-
-





Else - Actions
-






Item - Create loot_spawn_types[loot_ran_num] at loot_spawn_pt
-






Custom script: call RemoveLocation(udg_loot_spawn_pt)
-
-
-
-



Else - Actions
-
-
-
-
Respawn Creeps A
-

Events
-


Game - The in-game time of day becomes Equal to 6.10
-


Time - creeps_timer expires
-
-

Conditions
-


(day_counter mod 2) Equal to 0
-
-

Actions
-


Set VariableSet creep_A_interger = (creep_A_interger + 1)
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(creep_array[creep_A_interger] is dead) Equal to True
-
-



Then - Actions
-




Unit - Create 1 creep_type[creep_A_interger] for Neutral Hostile at creep_point[creep_A_interger] facing creep_real[creep_A_interger] degrees
-




Set VariableSet creep_array[creep_A_interger] = (Last created unit)
-




Special Effect - Create a special effect at creep_point[creep_A_interger] using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.mdl
-




Special Effect - Destroy (Last created special effect)
-
-



Else - Actions
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




creep_A_interger Not equal to creep_counter
-
-



Then - Actions
-




Countdown Timer - Pause creeps_timer
-




Countdown Timer - Start creeps_timer as a One-shot timer that will expire in 0.03 seconds
-
-



Else - Actions
-




Countdown Timer - Pause creeps_timer
-




Set VariableSet creep_A_interger = 0
-




Trigger - Run Respawn Creeps B <gen> (checking conditions)
-
-
-
-
-
Respawn Creeps B
-

Events
-

Conditions
-


((This trigger) is on) Equal to True
-
-

Actions
-


For each (Integer creep_D_integer) from 1 to 15, do (Actions)
-



Loop - Actions
-




Set VariableSet creep_temp_group = (Units in creep_camp_regions[creep_D_integer] owned by Neutral Hostile)
-




Unit Group - Pick every unit in creep_temp_group and do (Actions)
-





Loop - Actions
-






Set VariableSet creep_temp_unit = (Picked unit)
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Level of Treasure Aura (Neutral Hostile) for creep_temp_unit) Not equal to 1
-
-







Then - Actions
-








Unit Group - Add creep_temp_unit to creep_camp_groups[creep_D_integer]
-








Unit - Add Treasure Aura (Neutral Hostile) to creep_temp_unit
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










(Unit-type of creep_temp_unit) Equal to |cff009900Uncommon Treasure|r
-
-









Then - Actions
-










Set VariableSet creep_chest[creep_D_integer] = creep_temp_unit
-










Unit - Add Mark of New Loot Chest (class) to creep_temp_unit
-










Unit Group - Add creep_temp_unit to Creep_Treasure_Unit_Grp
-
-









Else - Actions
-
-
-







Else - Actions
-
-






Set VariableSet creep_temp_unit = No unit
-
-
-




Custom script: call DestroyGroup(udg_creep_temp_group)
-
-
-
-
Last edited:

