wc3edit.net
https://forum.wc3edit.net/

kinda short trigger lags, tried to remove leaks but same eff
http://forum.wc3edit.net/deprotection-cheating-f64/kinda-short-trigger-lags-tried-to-remove-leaks-but-same-eff-t30667.html
Page 1 of 1

Author:  XD! [ January 24th, 2016, 10:51 am ]
Post subject:  kinda short trigger lags, tried to remove leaks but same eff

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:
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.

Author:  JustANewbie [ January 25th, 2016, 4:56 pm ]
Post subject:  Re: kinda short trigger lags, tried to remove leaks but same

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

Author:  XD! [ January 26th, 2016, 1:15 pm ]
Post subject:  Re: kinda short trigger lags, tried to remove leaks but same

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?

Author:  JustANewbie [ January 26th, 2016, 4:58 pm ]
Post subject:  Re: kinda short trigger lags, tried to remove leaks but same

perhaps disable trigger and enable after wait would work
wait is always bad, don't use wait

Author:  XD! [ January 28th, 2016, 12:12 pm ]
Post subject:  Re: kinda short trigger lags, tried to remove leaks but same

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.

Author:  JustANewbie [ February 2nd, 2016, 6:08 pm ]
Post subject:  Re: kinda short trigger lags, tried to remove leaks but same

"stand down"? that surprised me too, so what's the difference between "stand down" and "stop"?

Author:  XD! [ February 4th, 2016, 2:52 pm ]
Post subject:  Re: kinda short trigger lags, tried to remove leaks but same

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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/