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

Random AI for an Altered Melee

Status
Not open for further replies.
Level 11
Joined
Feb 2, 2011
Messages
342
First I am going to allow the user to manually or randomly choose their races for an altered melee map. Then I want a random custom AI to be executed for each random players, matching their races. How can I do this?
 
Level 4
Joined
Nov 27, 2012
Messages
85
Create a dialog for each player, with each race.
if X race is chosen, start ai?

For random
Set each race and AI to an array
Human=integer[1]
undead=integer[2]
etc
Human=AI[1]
undead=AI[2]

If player chooses random, get random integer between 1-4 and if random integer=1 set human race+ai
 
Level 11
Joined
Feb 2, 2011
Messages
342
Create a dialog for each player, with each race.
if X race is chosen, start ai?

For random
Set each race and AI to an array
Human=integer[1]
undead=integer[2]
etc
Human=AI[1]
undead=AI[2]

If player chooses random, get random integer between 1-4 and if random integer=1 set human race+ai

Could you create a YouTube video or Hive Workshop tutorial to show me, and others, exactly how to do this please? Thanks!
 
Have you created an additional custom race from scratch, or have you modified a default race?

Creating altered melee AI might be hardcore, you need be very experienced, or an other pro coder who does it for you.
How ever, for this person it should be no problem to implement such a trigger to bind the correct AI execution to the randomized race.

Create a dialog for each player, with each race.
if X race is chosen, start ai?
I don't think a dialog is needed to execute the AI, as AI is usually needed only for computer playeys, and computer players won't click any dialog button anyway.

Could you create a YouTube video or Hive Workshop tutorial to show me
Serious? :eek:
 

sentrywiz

S

sentrywiz

First I am going to allow the user to manually or randomly choose their races for an altered melee map. Then I want a random custom AI to be executed for each random players, matching their races. How can I do this?

You can create a new race by replacing an already existing one ex. Humans and that changed race will appear in your AI Editor. That way you can make the AI you want for your new race without needing to do triggers.

But if your new race isn't overlapping an existing one, then you would need triggers. First off you need:

1. Dialog to ask the player for a race (Race1, Race2, Race3, Random)

2. Check via triggers if everyone has a race (like boolean true/false)

3. Initiate random AI for the computer opponents with this action:

  • AI - Start melee AI script for Player X (X): randomAI.ai
Could you create a YouTube video or Hive Workshop tutorial to show me, and others, exactly how to do this please? Thanks!

Nobody here has time for that. Explaining is one thing, making an entire video for one specific map is something nobody has time / patience to do.

I suggest learning yourself, step by step.
Visit the tutorial section to get started:
http://www.hiveworkshop.com/forums/tutorials/

Here are some tutorials for the AI Editor:
http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/ai-editor-162687/
http://www.hiveworkshop.com/forums/jass-ai-scripts-tutorials-280/ai-editor-29314/
 
Status
Not open for further replies.
Top