• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

I need help with a trigger

Status
Not open for further replies.
Level 2
Joined
Jul 23, 2005
Messages
24
:| 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 :lol:
 
Level 13
Joined
May 5, 2004
Messages
1,330
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.
 
Level 6
Joined
Aug 29, 2004
Messages
159
heres one that will work:



Code:
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
That should work nicely

=][= Bort
 
Status
Not open for further replies.
Top