• 🏆 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!

Attack-Move To Trigger fail

Status
Not open for further replies.
  • Orders
    • Events
      • Time - Every 20.00 seconds of game time
    • Conditions
    • Actions
      • Set MonstersOrders = (Center of Ancient Tree of Eternety <gen>)
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 12 (Brown)) and do (Unit - Order (Picked unit) to Attack-Move To MonstersOrders)
      • Custom script: call RemoveLocation (udg_MonstersOrders)
Also I order them to move in action right after they spawn:
(Not whole trigger only small part)

  • For each (Integer TempInteger) from 1 to 5, do (Actions)
    • Loop - Actions
      • Unit - Create (Monsters_Number[2] / 5) Dark Monster - Wave 01 for Player 12 (Brown) at Monsters[TempInteger] facing Default building facing degrees
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 12 (Brown)) and do (Unit - Order (Picked unit) to Attack-Move To MonstersOrders)
If anyone has any idea why units become dump, why they stay on created locations while some attack move please leave comment!
(Some move and attack to target location, some units don't, also there is something like move stop move stop movement -.-)

Also max number of created units is 200 (2 times only) normal is (100)
 
It's the Warcraft engine that fails. Can you break up the units to be owned by different players? That may help.

  • Pick every unit in (Units in (Playable map area) owned by Player 12 (Brown))
I do that!

What if I replace that for specific unit type:
Different one for each spawn trigger?

Or should I add condition to that Order trigger to affect only 35 spawning units :D


EDIT:
  • Orders
    • Events
      • Time - Every 20.00 seconds of game time
    • Conditions
    • Actions
      • Set MonstersOrders = (Center of Ancient Tree of Eternety <gen>)
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 12 (Brown)) and do (Unit - Order (Picked unit) to Attack-Move To MonstersOrders)
      • Custom script: set bj_wantDestroyGroup = true
      • Custom script: call RemoveLocation (udg_MonstersOrders)

Damn I forget about group :D
 
BUMP

Ok I think that I found solution:

  • For each (Integer TempInteger) from 1 to 5, do (Actions)
    • Loop - Actions
      • Unit - Create (Monsters_Number[2] / 5) Dark Monster - Wave 01 for Player 12 (Brown) at Monsters[TempInteger] facing Default building facing degrees
  • For each (Integer TempInteger) from 1 to 35, do (Actions)
    • Loop - Actions
      • Unit Group - Pick every unit in (Units owned by Player 12 (Brown) of type MonsterType[TempInteger]) and do (Unit - Order (Picked unit) to Attack-Move To MonstersOrders)
      • Custom script: set bj_wantDestroyGroup = true
I cleared all leaks and stuff like variables are done in other triggers or in this above or below this actions!

Point is that this works 80% of time (Last one 25%) so we made progress.

Btw, I want to ask moderators not to close this thread (left it at least 2 or 3 days) so if anyone with better idea or solution cam help!
Thanks

+rep goes to Maker
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • For each (Integer TempInteger) from 1 to 35, do (Actions)
    • Loop - Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by Player 12 (Brown) of type ...
Do it like that, with the bj.

You can also try picking units matching condition:

  • Unit Group - Pick every unit in (Units owned by Player 12 (Brown) matching ((((Matching unit) is alive) Equal to True) and ((Current order of (Matching unit)) Equal to (Order(<Empty String>))))) and do (Actions)
    • Loop - Actions
So you only pick units that have no orders, they are not moving or attacking. It helps to reduce the amount of units that stop moving I believe.
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
There are 2 things that might be wrong.

1) If a player has too many units (dunno the exact amount but lets say something like 200 units is alot already) he will get trouble controlling them. This means all units just stand there, move 5 steps and wait 5sec again then move 5 steps again etc.. Thats the wc3 issue you just gotta live with unfortunately. A solution would be for maps with lots of units to have 2 computer enemies. This is why maps like hero defenses always have 3 Computer (enemy) players. Because else the creeps start to act 'dumb'.

2) I'm not really sure, but the pick every unit event MIGHT make the player select all the units but with a cap of 12 selected units at the same time. Its been a while ago when I tried to make something similair as you. I don't know if this was the thing causing it, but just to let you know there is a slight chance.:D
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
What about.

Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
Add (Picked Unit) to UNITGROUP

Loop - Number of units in UNITGROUP / 12 times
Loop - 12 times
Pick first of group UNITGROUP
Order (Picked unit) to Attack-Move to loc
Remove (Picked unit) from UNITGROUP

Try that out.. (sorry the text might be wrong but I think you know what I mean)
 
What about.

Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
Add (Picked Unit) to UNITGROUP

Loop - Number of units in UNITGROUP / 12 times
Loop - 12 times
Pick first of group UNITGROUP
Order (Picked unit) to Attack-Move to loc
Remove (Picked unit) from UNITGROUP

Try that out.. (sorry the text might be wrong but I think you know what I mean)

Thanks but I tried that still same, problem is:

If you pick this setup:

-Monsters Strength: Uber Strong
-Wait Time: 30 Seconds (Don't Wait)
-Monsters per Wave: 50/100/200

Units will be summoned every 30 seconds (100 normal, 50 when is powerful wave and 200 when is horde wave) Uber Strong means that monsters/creeps hp is 5 times larger than hp in default mode, so player kill only half of units and after 10 waves you have 500 or more units!

There is no trigger that will control that ^^

Btw it work really fine for any other mode (best mode is with wait time, so it will summon units when all from wave before are killed)

Thanks for help guys!
 
Status
Not open for further replies.
Top