• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Help with multiple enemy AIs

Status
Not open for further replies.
Level 2
Joined
Jun 14, 2020
Messages
8
Hey so I just started developing a short custom campaign, and ran into a roadblock with enemy ai. Essentially, I created AI programs for two enemy bases in a map, and when tested separately they both work as intended (they send attack waves, rebuild their base, etc.). However, when I tried to implement them at the same time, the second AI completley stopped working. It wasn't implemented at all, by which I mean that the first AI player's name didn't change, and that player did not appear on the score screen.

It seems like the editor will only let me make one computer player, and I was wondering if there was a workaround for that? Even though I have 2 computer players in the scenario tab, the map will only create the first one, which means that I can only have one AI enemy. Any help would be greatly appreciated.

I am also on the reforged editor if that is relevant.
 
Level 2
Joined
Jun 14, 2020
Messages
8
That is a very strange bug, not one ive encountered before. How are you starting the AI?
I'm using the trigger "run melee AI script for X player". I think the issue is that the second computer player doesn't exist, but you could definitely be right that I'm implementing the AIs incorrectly
 
Level 2
Joined
Jun 14, 2020
Messages
8
What do you mean that the second computer player doesnt exist?


Hey sorry that I was unclear earlier, I really appreciate you trying to help me out. What I mean by the second computer player not existing is that that player does not seem to be recognized by the game when I test the map. Essentially, for the first AI (first as in order of color starting with red on the "Player Properties" tab) they are labelled as "Computer (Normal)" before their AI script is run, after which they will be labelled either "Local Milita".It seems like the map recognizes that first player as a computer player, so it allows me to override what is seemingly a placeholder script ("Computer (Normal)") with my own AI ("Local Militia"). However, for the second player (again in order of color on Player Properties) the game doesn't seem to recognize them as a Computer player that exists, as unlike the first player they aren't labelled "Computer (Normal)" (or anything) before the trigger that runs their AI becomes active. After that trigger is run the AI just isn't applied, as it seems like the game does not consider that player to exist, and as such will not allow AI scripts to be applied to it. This second player also does not appear on the score screen, which also indicates the the game doesn't recognize this player.

It sort of seems like I'm stuck in a setting that only allows me to make 1v1s, as it only allows applies the first computer player on the list in the "Player Properties" tab. Sorry if this explanation is kind of hard to understand, but this problem is really confusing to me.
 
In player properties make sure theyre both set as computer then go to the Forces tab and tick the two boxes at the top left that will allow you to set the names of the computer players from the player properties tab rather than having to use AI to do it. Also make sure that youre saving the AI files and then importing them rather than applying them through the AI editor.
 
Level 2
Joined
Jun 14, 2020
Messages
8
In player properties make sure theyre both set as computer then go to the Forces tab and tick the two boxes at the top left that will allow you to set the names of the computer players from the player properties tab rather than having to use AI to do it. Also make sure that youre saving the AI files and then importing them rather than applying them through the AI editor.

Thanks so much for the help! Apparently all I had to do was turn Custom Forces on.
 
Status
Not open for further replies.
Top