• 🏆 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!

[Solved] How to off this.

Status
Not open for further replies.
Level 5
Joined
Aug 21, 2012
Messages
107
This is something...

Ok I created a cinematic that begins when a unit enter this region.

When my unit entered the region, I planned to move the unit behind the triggered region to make it like walking but when my unit is about to pass the region, it keeps looping every time my unit passes it.

Can a trigger delete the region after my unit enters it? If not pls inform me though.
 
Level 5
Joined
Aug 21, 2012
Messages
107
What I did is that I created three triggers. The first triggers is:
  • Events
    • Map initialization
  • Actions
    • Trigger - Turn off (Third Trigger)
The second trigger contains:
  • Events
    • Unit - A unit enters Region 009 <gen>
  • Actions
    • Trigger - Turn on (Third Trigger)
    • Trigger - Turn off (This Trigger)
The Third trigger then holds all the action and are started with time elapsed.

Good?
 
Level 5
Joined
Aug 21, 2012
Messages
107
I deleted my 1st and change my second:
  • Events
    • Unit - A unit enters Region 009 <gen>
  • Actions
    • Trigger - Run Third Trigger <gen> (ignoring conditions)
    • Trigger - Turn off (This Trigger)
I also deleted the event in my third and it worked. Thank to you all.
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
or just use boolean. If unit enters the region for the first time, run cinematic and change boolean value. Then when unit enters that region again (which is during cinematic I guess), it will do something else, since the boolean value will be different by that time.
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
What do you mean turn off??? The trigger??? or remove a rect??
Or Just use this to remove a rect or destroy rect ( it will remove the rect and turns in the center of playable area )
  • Custom Script: call RemoveRect ( udg_your_rect)
or a preplaced rect.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
I would have made it so that the unit is added into a unit group when the region is entered. The trigger has a conditon "unit is in group equal to false" for the actions to run.

The unit group could be replaced by saving a boolean into an array or hashtable.

I will mark the thread SOLVED
 
Status
Not open for further replies.
Top