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

[Solved] Run a campaign AI script to replace an already running AI script

Status
Not open for further replies.
Level 2
Joined
Feb 25, 2019
Messages
9
Hello,
I need some help to solve this campaign AI problem. I use world editor version 1.24b (6059).

To be more specific, here are the pictures showing the AI triggers that I want to be run properly.

picture A (trigger named "Player AIs A")
AI_A.png


picture B (trigger named "Player AIs B")
AI_B.png

I want "Player AIs A" to be run first, then after several minutes "Player AIs B" becomes the next one.

But from what I have observed in the game, the later executed AIs didn't replace the former ones.

So, how do I run a campaign AI script when another campaign AI script is already being run?
Some explanation or picture helps best.
 
Last edited:
Level 12
Joined
Jun 15, 2016
Messages
472
You can't. At least not with triggers.

A possible solution will be to have an AI script which works in pattern A, then switches to pattern B by command. If both patterns are simple, it shouldn't be too hard to put them in the same script.
 
Level 2
Joined
Feb 25, 2019
Messages
9
Thanks for the response. Though I'm still figuring out what you meant by those patterns. Are they AI command triggers, conditions that can be made in the AI editor, or something else? But regarding the solution, the bad news is I'm not experienced in using AI commands to control how the AI works or behaves. So I guess I'll look for some alternatives to this problem myself. The only thing I can do for now is using certain conditions on the AI's attack waves and building queue to allow the next contents of the AI to run and disable the previous AI contents. Maybe if I learn further about AI functions, it will be possible for me to control AI using commands.

I consider this problem currently solved.
 
You see the AI function "Send AI command (0,0)" well anytime in your AI script you put WaitforSignal() anything after that won't run until you send that AI command and anything that runs will then stop after it encounters another WaitforSignal() so you can use that to add stages to your AI as necessary.
 
Level 2
Joined
Feb 25, 2019
Messages
9
Okay maybe I will learn about those functions in the future. Since coding in warcraft 3 editor is a blind area to me, I can just solve this issue using simple solutions I know of. I will come back to this post when a problem that requires those functions arises.
 
Status
Not open for further replies.
Top