- Joined
- Oct 16, 2004
- Messages
- 16
I'm working on a trigger that respawns the creeps in a region when a specific quest is recieved. This questing area is open for creeping before the player even recieves the quest, but assuming they kill everything in the region... I don't want it to be barren when they return to complete the quest.
To further fool-proof the trigger I've made it so it destroys every creep in the region before respawning them (Just in case the player hasn't been to that region and creeped there yet)
Where it stands right now, it "Kills" the units, rather than "Removes" them. (Though I'd prefer remove) and they do successfully respawn if it's the trigger that kills them and not the player. But if the player kills the units... A few minutes pass by... The respawn trigger won't work.
I basically know the problem, but because the trigger is activated by recieving a quest (Rather than standard respawn triggers that activate from the units death) I can't make my trigger refer to the units I need to. "Triggering Unit" doesn't work, and "Picked Unit" doesn't work after the dead units have thoroughly decayed.
There are two relevant triggers to the respawn and I've based it around Fireeye's respawn system (Post #9 from this thread: http://www.hiveworkshop.com/forums/f269/respawn-creeps-their-starting-position-34577/)
Here're my triggers:
To further fool-proof the trigger I've made it so it destroys every creep in the region before respawning them (Just in case the player hasn't been to that region and creeped there yet)
Where it stands right now, it "Kills" the units, rather than "Removes" them. (Though I'd prefer remove) and they do successfully respawn if it's the trigger that kills them and not the player. But if the player kills the units... A few minutes pass by... The respawn trigger won't work.
I basically know the problem, but because the trigger is activated by recieving a quest (Rather than standard respawn triggers that activate from the units death) I can't make my trigger refer to the units I need to. "Triggering Unit" doesn't work, and "Picked Unit" doesn't work after the dead units have thoroughly decayed.
There are two relevant triggers to the respawn and I've based it around Fireeye's respawn system (Post #9 from this thread: http://www.hiveworkshop.com/forums/f269/respawn-creeps-their-starting-position-34577/)
Here're my triggers:
- Events
- Map initialization
- Conditions
- Actions
-
Set CampGrizznatchUnitGroup = (Units in Camp Grizznatch <gen> owned by Neutral Hostile)Unit Group - Pick every unit in CampGrizznatchUnitGroup and do (Actions)
-
Loop - Actions
- Set CampGrizznatchRespawnPoint[CampGrizznatchRespawnInteger] = (Position of (Picked unit))
- Set CampGrizznatchRespawnUnitType[CampGrizznatchRespawnInteger] = (Unit-type of (Picked unit))
- Unit - Set the custom value of (Picked unit) to CampGrizznatchRespawnInteger
- Set CampGrizznatchRespawnInteger = (CampGrizznatchRespawnInteger + 1)
-
Loop - Actions
- Events
- Unit - A unit comes within 200.00 of Magistrate Alistair 0083 <gen>
- Conditions
- (Owner of (Triggering unit)) Equal to Player 1 (Red)
- Actions
- Unit Group - Pick every unit in CampGrizznatchUnitGroup and do (Unit - Kill (Picked unit))
- Wait 0.01 seconds
- Unit - Create 1 CampGrizznatchRespawnUnitType[(Custom value of (??? unit))] for Neutral Hostile at CampGrizznatchRespawnPoint[(Custom value of (??? unit))] facing (Random angle) degrees