• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Something is missing...

Status
Not open for further replies.

elwizprezley

E

elwizprezley

Ok guys im gonna try explaning as simple as possible and understandable
let says i am making a trigger

EVENT:
Unit enters a rect called <rect1 gen>
CONDITION:
Entering unit equals to a hero
ACTION:
Create 2 Footmans at <rect2 gen>

Now this working perfectly btw this is example it might be diffrent way sayings on real trigger making this is just example

NOW ----> I always either put Trigger turn off or trigger Turn On there is many more like destroy trigger blah blah BUT how do i reset the trigger so it goes from the top again?
 
  • Your trigger
  • Events
    • Unit enters a rect called <rect1 gen>
  • Conditions:
    • Entering unit equals to a hero
  • Actions:
    • set TempLoc = Center of <rect2 gen>
    • Unit - Create 2 Footman at TempLoc
    • Custom Script: call RemoveLocation(udg_TempLoc)
Notes:
  • You do not need to reset the trigger, it activates when a unit enters rect 1
  • The trigger I have given will not leak and therefore won't cause any lag
  • The custom script is case sensitive!

If you've got any further questions, feel free to ask.
 
If that's what you mean, that he should use it in another trigger, then please say that. But I see no reason to use that, at all.

Triggers still run even after all the actions are done, and if you remove a trigger while it's thread is still running, you should end up with a handle stack corruption.
Sound good?

You never need to reset a trigger.
The trigger ap0calypse posted works just fine.
 
maybe this:
  • Actions
    • Trigger - Run (This Trigger) ignoring conditions
and this trigger is over the whole time <On> and runs every time a unit enters yourrect, until you make
  • Actions
    • Trigger - Turn off (This Trigger)
  • OR
    • call DestroyTrigger(GetTriggeringTrigger())

this would almost be a fine solution, I can see what you were thinking, but:
  • Destroying triggers is not recommended (not in this case, where he uses the event "unit enters a region").
  • This will result in an enormous, infinite loop which creates 1 unit without a wait (real wait / timer wait / normal wait or whatever).
    If you create units at that rate and turn the trigger off after a few seconds, an incredible amount of units have been spawned

It was worth the try, though ;) but for it to work you would have to add a little wait before running the trigger again.
 
Status
Not open for further replies.
Back
Top