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

Mass

Status
Not open for further replies.
Level 4
Joined
Oct 31, 2010
Messages
34
This trigger i made doesnt work maker made it and i tested it but it doesnt work i want to make all the footmen go in the middle to fight this is like Custom hero footies
ntitled Trigger 010
Events
Player - Player 1 (Red) skips a cinematic sequence
Conditions
Actions
Custom script: set bj_wantDestroyGroup = true
Set point = (Center of (Playable map area))
Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Footman))) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Attack-Move To point
Custom script: call RemoveLocation(udg_point)
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
It's hard to tell for sure what the problem may be, but I'll give you something to check in case you're hesitant to post the map (it may be required though).

From first glance, it seems like maybe you aren't Player 1 (Red) (because this is a trigger setup for that player specifically). It may also be the case that the units on your map are not of type Footman. In the case where you're using custom units (if you are) you'll have to be sure that you're getting the right unit IDs.

Basically what is happening is you're checking whether or not the unit's ID matches 'hfoo' (the unit ID for the footman) and that the unit is alive. So, make sure this field reflects the unit which you're trying to order to move.

Also, you can encapsulate what you've posted in
  • tags to get it to look proper:
  • [trigger]ntitled Trigger 010
  • Events
  • Player - Player 1 (Red) skips a cinematic sequence
  • Conditions
  • Actions
  • Custom script: set bj_wantDestroyGroup = true
  • Set point = (Center of (Playable map area))
  • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Footman))) and do (Actions)
  • Loop - Actions
  • Unit - Order (Picked unit) to Attack-Move To point
  • Custom script: call RemoveLocation(udg_point)
 
Level 11
Joined
Nov 15, 2007
Messages
781
Berb's right.
Also, here's a disclaimer: When you're ordering the units to attack-move,
if there were, let's assume, 300 units on the map, the orders would be
delayed and you'd see units move and stop at random times.

300 units owned by one player^

Pathfinding is what causes units to "slow down" because it has a limited number of checks per player, IIRC. If you have 50 units owned by 6 players it may be fine; 300 owned by 1 player, probably not.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
If you've got a predefined path you can eliminate that (I believe) by removing the unit's collision. I'll actually test that out, hopefully I am able to with my beast of a computer.

Sorry, scratch that. It's not simply the pathing, but by setting the movement type of the unit to Fly it seems to ignore this calculation.
 
Status
Not open for further replies.
Top