I wrote a trigger script that changes the player race to Terran before Unit INIT and Ai Init
It works fine on human players but it doesn't work on Ai.
I tried changing the Ai's race by changing the player race but Ai failed to recognize its build order and ended up doing nothing. Is there a way to change AI Race by trigger?
I worked on that, with custom melee AI. And I'm gonna be honest with you, it's unnecessarily complicated.
1/ You MUST change the AI race BEFORE you start the AI script (whether melee or campaign). You can change it to a custom race.
2/ The melee AI script knows ONLY the default ones, that is to say, for the default 3 races. If the race is a custom race (chosen from the game salon of in your player properties), the AI script won't work. Why ? Because it's native and it has entries for the AI galaxy scripts like the function "TerranInit". No fun allowed. In the debugger, you can see some in the tab "Internal Calls".
3/ So you MUST allow Terran, Zerg or Protoss only from the game salon or your player properties !
4/ Do NOT change it after it started. You will break it for similar reasons as 2/.
HAVE FUN
And a nice day.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I wrote a trigger script that changes the player race to Terran before Unit INIT and Ai Init
It works fine on human players but it doesn't work on Ai.
I tried changing the Ai's race by changing the player race but Ai failed to recognize its build order and ended up doing nothing.
Is there a way to change AI Race by trigger?
Hello,
I worked on that, with custom melee AI. And I'm gonna be honest with you, it's unnecessarily complicated.
1/ You MUST change the AI race BEFORE you start the AI script (whether melee or campaign). You can change it to a custom race.
2/ The melee AI script knows ONLY the default ones, that is to say, for the default 3 races. If the race is a custom race (chosen from the game salon of in your player properties), the AI script won't work. Why ? Because it's native and it has entries for the AI galaxy scripts like the function "TerranInit". No fun allowed. In the debugger, you can see some in the tab "Internal Calls".
3/ So you MUST allow Terran, Zerg or Protoss only from the game salon or your player properties !
4/ Do NOT change it after it started. You will break it for similar reasons as 2/.
HAVE FUN
And a nice day.