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

AI Attacking a specific location/different entrance

Status
Not open for further replies.
Level 3
Joined
Aug 9, 2018
Messages
24
Hello,

Is there a way to tell the AI (AI editor or JASS) to attack a specific entrance of a base of a specific wave? For example: I want the enemy (coming from the north) to attack the left side of the base on one wave and then the more northern entrance on a different wave. How could I do this?

upload_2019-9-22_15-55-50.png
 
Level 3
Joined
Apr 3, 2019
Messages
48
Did you try checking random paths? Or does it need to follow a consistent pattern of: Attack north, attack west, repeat?
 
Level 3
Joined
Aug 9, 2018
Messages
24
If you know how, would you mind explaining how to do both? But I guess probably random.
 
Level 3
Joined
Apr 3, 2019
Messages
48
Not sure how to do the latter, sounds like you could get creative with it, but I can't think of anything satisfactory (i.e. you could just enable pathing blockers or something if the wave comes close to your base I guess?? Depends on what your doing I guess, but that's just 1 idea). Random pathing is easy. Go to the AI editor and it should be one of the check boxes there right when you open it.
 
Level 3
Joined
Apr 3, 2019
Messages
48
You can use a random integer to simulate it

Yeah that's getting creative with it... and then maybe put a region or something at both ends and then just send the wave to different spot each time...

What is it exactly? Is the wave on a timer or something? Cause if so, then that'd work well I'd think.
 
Level 3
Joined
Aug 6, 2019
Messages
74
Yeah that's getting creative with it... and then maybe put a region or something at both ends and then just send the wave to different spot each time...

What is it exactly? Is the wave on a timer or something? Cause if so, then that'd work well I'd think.
timer
 
Level 8
Joined
May 21, 2019
Messages
435
Hello,

Is there a way to tell the AI (AI editor or JASS) to attack a specific entrance of a base of a specific wave? For example: I want the enemy (coming from the north) to attack the left side of the base on one wave and then the more northern entrance on a different wave. How could I do this?

View attachment 333249

I don't know about AI, but you can very easily achieve this with triggers. You simply tell the units to go to vantage points outside the 2 entrances, and then redirect them towards the base from those. That way, you have them moving towards those entrances, and then entering them through there.
If you use the attack-move to order, they will stop to attack enemies they encounter on the way.

If you want the frequency to be random, you can just roll a random integer.
 
Level 3
Joined
Aug 9, 2018
Messages
24
Ah I believe using the attack-move command in Jass would work best since I'll probably use two commands. One to have them attack-move to the outside of the entrance then the next to have them attack into the base.
I wouldn't want the AI to blatantly walk past an enemy without attacking it so I'm going to go with the attack-move.
Thank you all!
 
Status
Not open for further replies.
Top