I need help with a trigger... I want a trigger to spawn creeps every 45 seconds near or around my hero whenever my hero is present in a reigion. And when the hero leaves the reigion I want the trigger to deactivate. The problem I have is I made it where the creeps will spawn in a completely diffrent area within and the groups of creeps only spawn once
here is what I have: 2 triggers
trigger 1 dessert creeps init Events Unit - A unit enters sands of pain <gen> Conditions ((Triggering unit) is A Hero) Equal to True Actions Trigger - Run creepspawn sands <gen> (ignoring conditions)
trigger 2 (initally inactive) creepspawn sands Events Time - Every 45.00 seconds of game time Conditions Actions Unit - Create 2 Sand Bandit for Player 11 (Dark Green) at (Random point in sands of pain <gen>) facing Default building facing (270.0) degrees
Is there somthing I did wrong in this trigger or will it just not work this way? If it wont work at all will somone help me make a trigger that will work and fits all my requests? plz this would help alot
Seems like you had the correct idea, but used the wrong action. The "Trigger - Run creepspawn sands <gen> (ignoring conditions)" doesn't activate the other trigger, it simply runs it once. Use the "Trigger - Turn Trigger On/Off"-action. For turning it off, simply make another trigger with a "Unit - Unit leaves region"-event and the "Trigger - Turn Trigger On/Off"-action.
Event - Periodic event: every 45 seconds of game-time
Conditions -
Actions - Unit group: Pick every unit within sands of pain <gen> and do multiple actions:
If picked unit is a hero equal to true
Picked unit belongs to player 11 (dark green) equal to false
Then Create 2 Sand Bandit for player 11 (dark green) at random point within 300 of picked unit [i think that action works, otherwise do:]
Create 2 Sand Bandit for player 11 (dark green) at random point within sands of pain <gen> Else do nothing