• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

DID anyone fix the "units always returning to their point of orgins"

Status
Not open for further replies.
Level 5
Joined
Jun 13, 2012
Messages
113
So my map is nearly done, only problem is that my units always return to there point of orgin after an issued order. The reason i put did anyone fix "units always returning to their point of orgins" is because i searched online for a solution before coming here for help and from 2008 till now no one has seem to solve this problem. it sucks that its occuring for me. i personally think that there is a solution because ive seen maps where units dont return back to the orgins of the issued order. Only problem is what is the solution?

so here are the other unsolved problems that are basicly having the same problem i am

http://www.thehelper.net/threads/units-always-returning-to-their-point-of-oringin.78192/
http://www.hiveworkshop.com/forums/world-editor-help-zone-98/units-return-after-attacking-215776/

Anyone know the solution PLEASE help :( caz ive tried everything listed in the top 2 links and nothing.
 
Level 25
Joined
May 11, 2007
Messages
4,651
Use tempPoints (points) and clear them after using them.

Something you should do anyhow.

Also, do your computer players have their player settings set and in the trigger map init, is the "use melee ai for computer players" removed?
 
Level 5
Joined
Jun 13, 2012
Messages
113
Make the unit stop after reaching it's destination?

Ive tried that. once they stop they move back to their orgin postion of there issued order

Use tempPoints (points) and clear them after using them.

Something you should do anyhow.

Also, do your computer players have their player settings set and in the trigger map init, is the "use melee ai for computer players" removed?

The tempPoints i havent try that yet, but i did set the computer player settings and in trigger, melee ai is also removed.

Im gonna try the temp points one
 
Last edited by a moderator:
Level 2
Joined
Sep 16, 2014
Messages
17
Found a solution that works to some extent,though something is off: Use when unit gets to end location,"move instantly" to its own location. Example:
  • Events:
  • Unit - A unit enters Region 000 <gen>
  • Conditions:
  • Actions:
  • Unit - Move (Triggering unit) instantly to (Position of (Triggering unit))
Also temp positions don't work. :vw_sad:
 
Last edited:
Level 2
Joined
Sep 16, 2014
Messages
17
With a lot of testing finally found where the problem is,and ofc a solution. Problem is that it seems editor seems to give order to attack to the unit,before it is finished creating,meaning it is created,but once created 2 commands are still left,to move to location you put,and to point it where you told it to in the trigger.So to fix the problem just put a wait command between "create unit and "issue order" triggers. Example:
  • Events:
  • Map initialization
  • Conditions:
  • Actions:
  • Unit - Create 12 Footman for Player 12 (Brown) at (Center of (Playable map area)) facing Default building facing degrees
  • Set temp_grp = (Last created unit group)
  • Countdown Timer - Start timer as a One-shot timer that will expire in 0.01 seconds
  • Events:
  • Time - timer expires
  • Conditions:
  • Actions:
  • Unit Group - Pick every unit in temp_grp and do (Actions)
    • Loop - Actions
      • Unit - Order (Picked unit) to Attack-Move To (Center of Region 000 <gen>)
And this is an example,its memory leaks and such problems don't matter.
 
Last edited:
Level 5
Joined
Jun 13, 2012
Messages
113
With a lot of testing finally found where the problem is,and ofc a solution. Problem is that it seems editor seems to give order to attack to the unit,before it is finished creating,meaning it is created,but once created 2 commands are still left,to move to location you put,and to point it where you told it to in the trigger.So to fix the problem just put a wait command between "create unit and "issue order" triggers. Example:
  • Events:
  • Map initialization
  • Conditions:
  • Actions:
  • Unit - Create 12 Footman for Player 12 (Brown) at (Center of (Playable map area)) facing Default building facing degrees
  • Set temp_grp = (Last created unit group)
  • Countdown Timer - Start timer as a One-shot timer that will expire in 0.01 seconds
  • Events:
  • Time - timer expires
  • Conditions:
  • Actions:
  • Unit Group - Pick every unit in temp_grp and do (Actions)
    • Loop - Actions
      • Unit - Order (Picked unit) to Attack-Move To (Center of Region 000 <gen>)
And this is an example,its memory leaks and such problems don't matter.

Thx it works =)
 
Status
Not open for further replies.
Top