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

[General] Make AI enter in game

Status
Not open for further replies.
Level 4
Joined
Jan 1, 2016
Messages
77
My heroes selection system is one of circle of power, like angel arena, where you select the wisp and walk to the circle of selection to select a hero.
How can i make the AI enter in game? I mean, in the room of created game when you select "computer (easy) computer (normal) and computer (hard)" then it enters in game.
What i want is to it enter in game, when game starts, pick an unit wisp and walk to one random circle and start playing. Just that what i need to know to finish the AI, how can i make this? make them enter in game? Please help.

Just this is missing to finish the AI, the rest of AI system i already have (Use spells, walk, attack, retreat, defend etc.) it's just missing they enter in game and select unit.

If it is too much to explain, just tell me how to make them enter ingame.
Select the wisp and them start playing i can do using what i still have of AI system (Walk, spells, attack, run, defend etc)

Greetings!
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
How can i make the AI enter in game? I mean, in the room of created game when you select "computer (easy) computer (normal) and computer (hard)" then it enters in game.
What i want is to it enter in game, when game starts, pick an unit wisp and walk to one random circle and start playing. Just that what i need to know to finish the AI, how can i make this? make them enter in game? Please help.
You click the lobby slot and change it from open or closed to Computer. The corresponding player will now have a computer controller for the duration of the session.

As for getting them to select a hero. You can either "cheat" or do it the hard way. The cheat way bypasses selection completely, instead giving them the heroes directly on map initialization by picking a random hero like all random hero systems would (and possibly disabling the accompanying circle if no duplicates are allowed).

The hard way is to get the AI to play fair. You run the same random hero selection except you then get the circle for that hero and order the AI's wisp unit, which you can find by group searches in the worst case, to go to that circle. You check every 10 seconds if the AI player has made a selection, and if not you find another random hero and order their wisp to that circle.

After the wisps are created (or map initialization if they are pre-placed) you check all players to determine which is computer controlled and then perform one of the above described solutions.
 
Status
Not open for further replies.
Top