Creep Respawn Trigger Reforged

Level 2
Joined
Mar 26, 2024
Messages
6
Hi everyone. I've been looking for a while for a creep respawn trigger that works with Reforged. The creeps should respawn at their default location, not where they died. For example, 60 seconds for all creeps on the map.

I'd really appreciate any help.
 
Rexxar campaign has those on main maps for acts 1 and 2 (but it uses starting regions, as it tracks groups). There you'll also find that it does not allow to spawn where player can see them, if you want.

How I would do it (from memory and by basic logic, sorry for not using trigger formatting and using pseudocode):

Trigger 1 - track your creeps
Event - Map Init (or run after creating them)
Actions:
Pick each unit owned by Neutral Hostile
Set TrackedCreep[index] = picked unit
Set CreepPoint[index] = Position of picked unit
Set index = index+1
Set TrackedCreepAmount = index


Trigger 2 - basic respawning
Event - Every 60 seconds
Condition - InCinematic Equal False
Actions:
For each index from 1 to TrackedCreepAmount do
If TrackedCreep[index] is dead
then Create 1 Unit of type (unit type of TrackedCreep[index]) at CreepPoint[index] facing random angle


Main point - store their starting points if you want to spawn them at starting positions.


Note - not sure if unit type is tracked for unit that has been removed from game may have to track it too (in trigger 1 Set TrackedType[index] = Unit type of picked unit)
 
Back
Top