• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Giving empty slots Computer AI

Status
Not open for further replies.
Level 11
Joined
Jun 2, 2004
Messages
849
When a player slot is set to Computer, then the game will automatically use some AI for it; particularly it will cause the units to use abilities like Stormbolt intelligently. I want to enable this when a player leaves the game. Can it be done?
 
I think u need to modify this trigger:
 

Attachments

  • 123.png
    123.png
    11.6 KB · Views: 208
When a player slot is set to Computer, then the game will automatically use some AI for it; particularly it will cause the units to use abilities like Stormbolt intelligently. I want to enable this when a player leaves the game. Can it be done?
I'm surprised no one has answered this very simple question yet. I stopped editing maps a few years ago but I believe I still remember enough. this is a process that can be set up in trig

event: player leaves
condition: none
action: AI, set melee script

it will be something to that effect. only you will need to create an AI for every hero type in order to use the spells intelligently. which means you will need an if statement in your action which cycles through all the hero types looking for the right AI match

with the world editor you can make AI scripts to handle 3 heroes every script
 
I attempted a simple:
  • AI - Start melee AI script for (Player(14)): map.ai
on an empty player slot for testing, but the player's hero did not use potions or abilities like a computer controlled slot would.

I certainly do not wish to code my own AI, since the base game already has one and I know how it works. If possible I'd just like to enable it for empty player slots/left players. If I can't do that, then oh well; I'll just tell players to use Computer slots if they want bots and let leaving player's stuff be braindead.
 
I attempted a simple:
  • AI - Start melee AI script for (Player(14)): map.ai
on an empty player slot for testing, but the player's hero did not use potions or abilities like a computer controlled slot would.

I certainly do not wish to code my own AI, since the base game already has one and I know how it works. If possible I'd just like to enable it for empty player slots/left players. If I can't do that, then oh well; I'll just tell players to use Computer slots if they want bots and let leaving player's stuff be braindead.
I'm pulling out my laptop right now

I'm on the case

in the mean time in the object handler, add 1 auto cast ability to every hero...what I mean by this is the first row in the edit area in the object area of your hero
 
Added a junk ability to Default Active Abilities (raise dead, which they don't have) and nuttin' either.
Lol you have to add an ability they actually have or else they can't use it

DUH :P

Anyway it isn't hard to make AI. I was going to do it for you but soon as I opened my laptop I lost all inspiration to do it. It is very easy but takes time. Go to the AI section of your world editor, it and icon of zeros and ones, click on it and then select the tab heroes. Then according to the race you are using different heroes will be available to you. Once more warcraft automatically selects the abilities for you. From there you just need to save the ai for every 3 sets of heroes and then import them later
 
Only slots that are Computer controlled can run AI. This means that slots that are empty, or human controlled cannot. One cannot enable Melee AI for a player who left.

That said one can apply a trigger built AI to any player and it will work. A trigger built AI is an AI that is implemented entirely out of triggers and interacts with players only by issuing orders.
 
Only slots that are Computer controlled can run AI. This means that slots that are empty, or human controlled cannot. One cannot enable Melee AI for a player who left.

That said one can apply a trigger built AI to any player and it will work. A trigger built AI is an AI that is implemented entirely out of triggers and interacts with players only by issuing orders.
that is factually incorrect

you can even give computers control of your characters In game
 
you can even give computers control of your characters In game
Yes you can transfer ownership of all units from a human or empty controlled player to a computer player and then get that computer player's AI to use them. However you cannot start an AI script for a non-Computer controlled player. If one could I am sure many more maps would be doing it.
 
Only slots that are Computer controlled can run AI. This means that slots that are empty, or human controlled cannot. One cannot enable Melee AI for a player who left.
Confirmation of this is precisely what I wanted. Thanks.

Too much of the map is built upon heroes not changing which player owns them to refactor at this point, so I'll probably just not worry about it.
 
Status
Not open for further replies.
Back
Top