wc3edit.net

United Warcraft 3 map hacking!
It is currently June 22nd, 2018, 3:28 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: January 24th, 2016, 10:51 am 
Offline
Senior Member
User avatar

Joined: May 15th, 2012, 6:09 pm
Posts: 173
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.


Top
 Profile  
 
PostPosted: January 25th, 2016, 4:56 pm 
Offline
Forum Spammer

Joined: August 18th, 2012, 2:32 am
Posts: 550
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


Top
 Profile  
 
PostPosted: January 26th, 2016, 1:15 pm 
Offline
Senior Member
User avatar

Joined: May 15th, 2012, 6:09 pm
Posts: 173
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?


Top
 Profile  
 
PostPosted: January 26th, 2016, 4:58 pm 
Offline
Forum Spammer

Joined: August 18th, 2012, 2:32 am
Posts: 550
perhaps disable trigger and enable after wait would work
wait is always bad, don't use wait


Top
 Profile  
 
PostPosted: January 28th, 2016, 12:12 pm 
Offline
Senior Member
User avatar

Joined: May 15th, 2012, 6:09 pm
Posts: 173
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.


Top
 Profile  
 
PostPosted: February 2nd, 2016, 6:08 pm 
Offline
Forum Spammer

Joined: August 18th, 2012, 2:32 am
Posts: 550
"stand down"? that surprised me too, so what's the difference between "stand down" and "stop"?


Top
 Profile  
 
PostPosted: February 4th, 2016, 2:52 pm 
Offline
Senior Member
User avatar

Joined: May 15th, 2012, 6:09 pm
Posts: 173
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)