• 🏆 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] Eternal Waves

Status
Not open for further replies.

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Hi.
I'm creating an AI file and I extracted an AI file from the campaign, but it didn't want to open.
Anyway, I'm posting in order to ask how to make a wave repeat indefinitely.
Your help is appreciated, I promise I'll award some reputation to whoever succeeds in helping me.

Thanks for your time!
 
Level 5
Joined
Oct 27, 2007
Messages
158
What do you mean by it didn't want to open? Campaign AI files are .ai files and can be opened by any text editor like notepad etc. I would advice using JassCraft since it allows for syntax checking and easier coding.


To make an attack repeat forever until the AI can't build anymore (when it loses buildings, workers) you can do something like this.
The following example will make the AI repeately attack Player 2 blue with Grunts and Berserkers.

Once you understand the basics you can create more advanced loops, like loops that can be interrupted by sending AI commands using triggers.

JASS:
globals
    player target = Player(1)
endglobals

loop
     call InitAssaultGroup()
     call CampaignAttackerEx(2, 4, 6, GRUNT)
     call CampaignAttackerEx(1, 2, 3, BERSERKER)
     call SuicideOnPlayerEx(4, 3, 2, target)
endloop
 
Status
Not open for further replies.
Top