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!
i currently have both a custom race and a custom AI, may i know how to i use a custom AI for a Campaign
i am new at this, just started with AI editing.
Can you post your triggers?
It is important, that the player status of that player is "computer" and that you do not start the melee ai for that player.
A few things I noticed:
the player is player 2, but player 1 is set as victim in the ai script.
you have several triggers with the event map initialization, that are connected and need to run in a certain order to work:
Burning Legion AI Attack has to run after Name, because it uses the variable that is set in Name
you can use
Trigger - Run Burning Legion AI Attack <gen> (checking conditions)
in Name to run Burning Legion AI Attack and remove the event from Burning Legion AI Attack.
the raw codes in your ai script are wrong:
Doomguard: you use "n00M:nbal", but you need to use 'n00M'. Raw codes consist of 4 characters and are marked with these ' '
With a syntax highlighter it looks like this:
JASS:
"n00M:nbal" //this is a string
'n00M' //this is a raw code
The hero abilities also need to be surrounded by ' ' and not " ".
There are syntax errors in your AI script:
JASS:
function main takes nothing returns nothing
call CampaignAI (<"u004:unp2">, function hero_levels)
call ConfigureAI()
local integer cmd // <==Only set it if you are going to use the option 2
... // Your building code here
// Option 1
call WaitForSignal() // <== Just waits until the map sends a command
local variables may only be declared at the top of the function, so no "set", "call", "if" or any other similar keyword before all locals
the ... before the // will also cause a syntax error. Either remove them or put them behind the //
I can't say for sure, that the AI will work, if you fix these, but you are getting it closer to work.
A few things I noticed:
the player is player 2, but player 1 is set as victim in the ai script.
you have several triggers with the event map initialization, that are connected and need to run in a certain order to work:
Burning Legion AI Attack has to run after Name, because it uses the variable that is set in Name
you can use
Trigger - Run Burning Legion AI Attack <gen> (checking conditions)
in Name to run Burning Legion AI Attack and remove the event from Burning Legion AI Attack.
the raw codes in your ai script are wrong:
Doomguard: you use "n00M:nbal", but you need to use 'n00M'. Raw codes consist of 4 characters and are marked with these ' '
With a syntax highlighter it looks like this:
JASS:
"n00M:nbal" //this is a string
'n00M' //this is a raw code
The hero abilities also need to be surrounded by ' ' and not " ".
There are syntax errors in your AI script:
JASS:
function main takes nothing returns nothing
call CampaignAI (<"u004:unp2">, function hero_levels)
call ConfigureAI()
local integer cmd // <==Only set it if you are going to use the option 2
... // Your building code here
// Option 1
call WaitForSignal() // <== Just waits until the map sends a command
local variables may only be declared at the top of the function, so no "set", "call", "if" or any other similar keyword before all locals
the ... before the // will also cause a syntax error. Either remove them or put them behind the //
I can't say for sure, that the AI will work, if you fix these, but you are getting it closer to work.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.