[AI] Patch 1.24 broke custom AI script functionality?

Status
Not open for further replies.
Level 5
Joined
Oct 27, 2007
Messages
158
After patching it seems that custom AI scripts are no longer working. To be sure I made a test map in the clean WE 1.24 version, without any enhancements. I've setup a small testing AI for player blue. Fixed player settings, start locations of course.

Every five seconds a message should appear saying that the AI script has started. Furthermore the AI should suicide one grunt every five seconds on the red player.

Custom AI seems to be broken in patch 1.24
But I'd like some feedback on that, just to be sure it's not something weird with my installation. I've attached the test map.

Thanks!
 

Attachments

  • test.w3x
    24 KB · Views: 53
Level 4
Joined
Nov 23, 2007
Messages
113
I tested it in 1.23 and it doesn't run there either. You can't call BJDebugMsg() from your AI script.

Remove this from your script (in the loop):

call BJDebugMsg("script is running...")

...and it should run just fine (in 1.23 anyway... haven't tested it on 1.24 as I haven't installed it yet).

You can replace the above msg with something like this:

call DisplayTimedTextFromPlayer(Player(1), 0.0, 0.0, 20.0, "AI script running...")

and the msg should be displayed.
 
Level 5
Joined
Oct 27, 2007
Messages
158
I tested it in 1.23 and it doesn't run there either. You can't call BJDebugMsg() from your AI script.

Remove this from your script (in the loop):

call BJDebugMsg("script is running...")

...and it should run just fine (in 1.23 anyway... haven't tested it on 1.24 as I haven't installed it yet).

You can replace the above msg with something like this:

call DisplayTimedTextFromPlayer(Player(1), 0.0, 0.0, 20.0, "AI script running...")

and the msg should be displayed.

Ah yes... I forgot about using constants like bj_MAX_PLAYERS in an AI script. Thanks! The test works in 1.24 too. I'm glad it's not a 1.24 issue.
 
Status
Not open for further replies.
Top