kinda short trigger lags, tried to remove leaks but same eff

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
XD!
Senior Member
Posts: 156
Joined: May 15th, 2012, 6:09 pm

kinda short trigger lags, tried to remove leaks but same eff

Post by XD! »

I'm trying to detect an interrupt to initial orders (such as attack-move to opposite base) on a creep after it was slide/pushed or also if it was spat out after a devoured instance (a.i. creeps are Player Slot 6 & 12 which are similar to Undead and Nightelf in dota). The push effect is due to a move instantly custom loop spell while the devour is the non-custom skill such as from a dragon turle in Wc3. And then if detected I resorted to doing a follow the next creep since it seem pretty basic.

Sorry if the trigger is badly named "randomFollowIfStoppedIncludeAiOnly"

Code: Select all

randomFollowIfStoppedIncludeAiOnly
    Events
        Unit - A unit Is issued an order targeting an object
        Unit - A unit Is issued an order targeting a point
        Unit - A unit Is issued an order with no target
    Conditions
    Actions
        Set newLOSTunit = (Ordered unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of newLOSTunit) Equal to Player 1 (Red)
                (Owner of newLOSTunit) Equal to Player 2 (Blue)
                (Owner of newLOSTunit) Equal to Player 3 (Teal)
                (Owner of newLOSTunit) Equal to Player 4 (Purple)
                (Owner of newLOSTunit) Equal to Player 5 (Yellow)
                (Owner of newLOSTunit) Equal to Player 7 (Green)
                (Owner of newLOSTunit) Equal to Player 8 (Pink)
                (Owner of newLOSTunit) Equal to Player 9 (Gray)
                (Owner of newLOSTunit) Equal to Player 10 (Light Blue)
                (Owner of newLOSTunit) Equal to Player 11 (Dark Green)
                (Owner of newLOSTunit) Equal to Neutral Hostile
                (Owner of newLOSTunit) Equal to Neutral Victim
                (Owner of newLOSTunit) Equal to Neutral Extra
                (Owner of newLOSTunit) Equal to Neutral Passive
            Then - Actions
                Custom script:   set udg_newLOSTunit=null
                Skip remaining actions
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Or - Any (Conditions) are true
                            Conditions
                                (Issued order) Equal to (Order(stop))
                                (Issued order) Equal to (Order(move))
                                (Issued order) Equal to (Order((String(851987))))
                                (Issued order) Equal to (Order((String(851974))))
                    Then - Actions
                        Set Temp_Pos = (Position of newLOSTunit)
                        Unit - Order newLOSTunit to Right-Click Temp_Pos
                        Set Temp_Group = (Units within 512.00 of Temp_Pos matching (((Matching unit) Not equal to newLOSTunit) and (((Owner of (Matching unit)) Equal to Player 6 (Orange)) or (Player 12 (Brown) Equal to (Owner of (Matching unit))))))
                        Wait until ((Number of units in Temp_Group) Greater than or equal to 1), checking every 0.50 seconds
                        Unit - Order newLOSTunit to Right-Click (Random unit from Temp_Group)
                        Custom script:   call DestroyGroup (udg_Temp_Group)
                        Custom script:   set udg_newLOSTunit=null
                        Custom script:   call RemoveLocation (udg_Temp_Pos)
                        Skip remaining actions
                    Else - Actions
                        Custom script:   set udg_newLOSTunit=null
                        Skip remaining actions
                Custom script:   set udg_newLOSTunit=null
                Skip remaining actions
Really need your help, guys. Thanks in advance.
. . .
JustANewbie
Forum Spammer
Posts: 510
Joined: August 18th, 2012, 2:32 am

Re: kinda short trigger lags, tried to remove leaks but same

Post by JustANewbie »

You are not removing leaks, when a unit satisfies the event trigger the action, you create group and location, and the group and location only remove if Number of units in Temp_Group Greater than or equal to 1, so if Number of units in Temp_Group) less than 1, the action keeps on repeating when order is issued, that means group and location are creating repeatly
User avatar
XD!
Senior Member
Posts: 156
Joined: May 15th, 2012, 6:09 pm

Re: kinda short trigger lags, tried to remove leaks but same

Post by XD! »

I really appreciate the reply.

Do you mean the program are overloaded even if I tried to exclude it using conditions? I don't know a straight fix for this, as you see I tried the temp_group destroy as world edit tutorial suggests.

Could you suggest a more specific solution or perhaps a sample fix?

About the units, I've read this "null"-ing thing so I equate them to null. As you replied it seems it's not enough.

(edit1) Can the solution made without jass methods?
. . .
JustANewbie
Forum Spammer
Posts: 510
Joined: August 18th, 2012, 2:32 am

Re: kinda short trigger lags, tried to remove leaks but same

Post by JustANewbie »

perhaps disable trigger and enable after wait would work
wait is always bad, don't use wait
User avatar
XD!
Senior Member
Posts: 156
Joined: May 15th, 2012, 6:09 pm

Re: kinda short trigger lags, tried to remove leaks but same

Post by XD! »

Good point. Though my code seemed fixed when I changed the condition of detecting units that are on order "stand down" instead of stop. Never seen "stand down" in the hiveworkshop "orders" trigger code before, so that really surprised me.
. . .
JustANewbie
Forum Spammer
Posts: 510
Joined: August 18th, 2012, 2:32 am

Re: kinda short trigger lags, tried to remove leaks but same

Post by JustANewbie »

"stand down"? that surprised me too, so what's the difference between "stand down" and "stop"?
User avatar
XD!
Senior Member
Posts: 156
Joined: May 15th, 2012, 6:09 pm

Re: kinda short trigger lags, tried to remove leaks but same

Post by XD! »

yeah it seems there's not a complete list on all those kind of orders. at least none that i've stumbled upon so far. the "orders" gui from hive didn't show stand down

stand down, as it seems to me is what happens after it is stopped from doing something such as from an attack-move.
. . .