• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Attack-Move trigger that loops smoothly

Status
Not open for further replies.
Level 2
Joined
Apr 28, 2010
Messages
19
Hey people,

So I'm trying to make myself a map where in units from one side "attack-move" towards the other side. I already know how to make them attack move a postion, but somehow it does not happen so smoothly as I hoped it would.

I don't know if someone is familiar with the custom game Blood tournament, but in that game the units also seem to attack-move from one side to the other while running somewhat smoothly.

So my trigger so far looks like this.
Events
Time - every 0.50 seconds of game time
Conditions
Actions
UnitGroup - Pick every unit in (units in Lane <gen> owned by Player 1 (Red) and do actions:
Loop - actions
Unit - order (picked unit) to Attack-Move To center of AttackZone

Also at the same time I am trying to make sure the owning player can not give orders to the unit but still read its skills and abillities.

So anyone knows how to make a somewhat smooth trigger (or triggers) for this? Or maby a link to some helpfull information.
 
There's a trick to making units unselectable:
Add the Locust ability (call UnitAddAbility(udg_MyUnit, 'Aloc")
Hide the unit
Remove locust
Unhide the unit

What makes blood tournament smooth is that not all units are spawned at the same time.

There is no trigger that makes it smoother; any added trigger will actually make it less smooth.

Each player slot can only have ~80 units moving at the same time, so if you want more than that you'll need to add dummy players for each player.

This is possible in an 8 player map, since there are a total of 16 player slots.

Besides the 12 players, you have:
Neutral Hostile
Neutral Extra
Neutral Victim
Neutral Passive

The only difference is that Hostile's units have a name tooltip, which you can remove using:
Game - Disable preselection functionality (for all units)
 
Level 2
Joined
Apr 28, 2010
Messages
19
Thanks man, that locust thingy was exaclty what I needed for making them less selectable.
I don't think I need dummy players as its not likely that their will be more than 80 units controlled by 1 player at the same time.

Only problem I still have right now is how to get a good attack location trigger, right now mine goes around the 3 seconds and it looks smooth but are there any other ways to do it?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
You should only issue attack move orders every 10 or so seconds (only once if possible). Every time a new move order is issued, all mini-move orders that are being carried out are discarded and so the unit has to stop and wait until the mini-move generator gets around to them again (it is run on 1 unit every frame for every player).

Attack move orders should persisit indefinatly unless something iterrupts the unit or it reaches its desternation.
 
Status
Not open for further replies.
Top