[Help] On A trigger.

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

lazyb0ne
Newcomer
Posts: 15
Joined: October 29th, 2007, 9:28 pm

[Help] On A trigger.

Post by lazyb0ne »

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 ><
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: [Help] On A trigger.

Post by Arabidnun »

There is a Event for telling when a Unit leave a region.

Code: Select all

Unit - A unit leaves Region 000 <gen>
From there you can:

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
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.
lazyb0ne
Newcomer
Posts: 15
Joined: October 29th, 2007, 9:28 pm

Re: [Help] On A trigger.

Post by lazyb0ne »

Thanks arab, oh yea u check ur msg?