[Help] On A trigger.
Moderator: Cheaters
-
- Newcomer
- Posts: 15
- Joined: October 29th, 2007, 9:28 pm
[Help] On A trigger.
I need a trigger, for When unit leaves, remove all units owned by player red in a region. I wonder is that possible because i've tried alot of ways but it doesn't work please help out. Also I have a question on, When unit enters region, owner of units equals to brown issue order to attack random unit from unit group. I want to see is there a more advanced or better way to make this trigger. The one i have right now is kind of unefficient. The units just sits there after destroying a few units. Please help ><
-
- Forum Staff
- Posts: 506
- Joined: August 5th, 2007, 1:38 pm
- Title: Gui Expert
- Location: *Unknown*
Re: [Help] On A trigger.
There is a Event for telling when a Unit leave a region.
From there you can:
This will pick every unit in that region owned by leaving player's unit, if that is not what you want? Just change (Owner of (Leaving unit))) to a specific player.
For chase triggers, I have yet to find any efficient ones of my taste and am currently looking into creating one of my own in GUI form. In the mean time, I would suggest posting a section in JASS to find an alternative route which might be more efficient and leak free to improve gameplay.
Code: Select all
Unit - A unit leaves Region 000 <gen>
Code: Select all
Unit Group - Pick every unit in (Units in Region 000 <gen> owned by (Owner of (Leaving unit))) and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
For chase triggers, I have yet to find any efficient ones of my taste and am currently looking into creating one of my own in GUI form. In the mean time, I would suggest posting a section in JASS to find an alternative route which might be more efficient and leak free to improve gameplay.
-
- Newcomer
- Posts: 15
- Joined: October 29th, 2007, 9:28 pm