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

[General] AI Players and Spawning/Attacking

Status
Not open for further replies.
Level 1
Joined
Dec 14, 2014
Messages
3
So I just joined up because I can't find an answer to this anywhere else. I have a problem (possibly), and a question of how to set up a trigger, and also some other map testing stuff.

So, first things first. How do I test my map with more than two players? I have the players set up and everything, but whenever I want to test the map it sets the User (me) as Red, and a random AI as blue. The User is supposed to be Light Blue, and the AIs should be Red, Purple, and Yellow. It will also take the units assigned to Purple and give them to Blue. Any idea of how to change this around?

Also, is there a way to test a map at extra speed so I can see time-based triggers work properly without having to wait the full 2 or more minutes for them to work?

And last question, I have set up some NPCs to spawn at a select location every 2 minutes or so. How do I direct them to, once they spawn, Attack Move to a specific location? When they spawn I want them to immediately charge to a specific location. Also, how to I get it to where they can only spawn if a specific building (unit) is still alive? I assume that's just a condition of Unit Alive = True?

Thanks in advance! Sorry, I'm a bit of a noob, but I'm trudging along.
 
1. Have you edited the Scenario?
2. Perhaps shorten the duration for testing temporarily?
3. Unit - Order Last Created Unit to Attack-move to <point>. Don't forget to remove leaks. Yeah, the condition is like that.

I'll be back in an hour or two with a testmap.

E: That was a long hour...
 

Attachments

  • Spawn Test.w3x
    13.4 KB · Views: 53
Last edited:
Level 1
Joined
Dec 14, 2014
Messages
3
1. Have you edited the Scenario?
Yes, all the players properties in the Scenario have been edited.

2. Perhaps shorten the duration for testing temporarily?
Ah, well that... makes sense. Will do.

3. Unit - Order Last Created Unit to Attack-move to <point>. Don't forget to remove leaks. Yeah, the condition is like that.
Thanks man. I thought it was something similar, but I wasn't sure; but thanks.

I'll be back in an hour or two with a testmap.

E: That was a long hour...

Thanks for that, man.

So yeah the only problem I still have would be the players not actually working properly when I test it. Only spawns player Red and Blue (despite blue not even existing on the map).

Also while I'm here, whats the trigger to get workers to harvest nearby wood automatically? I know how to do it for gold, but I can't figure it out for wood.
 
Level 7
Joined
Jun 15, 2010
Messages
218
every 5 seconds
pick every worker on playable map and do actions:
set picked unit = temp_unit
pick every destructable within 700 range of postion of picked unit, matching - matching destructable type = equal to tree
unit order - temp_unit to right click picked destructable
 
So yeah the only problem I still have would be the players not actually working properly when I test it. Only spawns player Red and Blue (despite blue not even existing on the map).
I'll look into it.

every 5 seconds
pick every worker on playable map and do actions:
set picked unit = temp_unit
pick every destructable within 700 range of postion of picked unit, matching - matching destructable type = equal to tree
unit order - temp_unit to right click picked destructable
That would enumerate the nearest 64 destructables for all workers, and would end up ordering them to harvest the last (aka farthest) per pick.
 
Status
Not open for further replies.
Top