OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: Ranger on 07 Oct 2007, 20:57:08
-
Does disableAI work in MP? I have a script that uses disableAI to disable the MOVE, AUTOTARGET, and TARGET aspects of an AI unit. In SP (in the editor), the script works just fine. However, whenever I test the mission in MP, the game crashes right after the mission starts. Are there any workarounds for this?
-
I will throw in something I would try to see if it affects the situation. According to the Biki this could be your problem.
Make sure the command disableAI is used only where the given AI unit is local.
It should be looked into.
The Community Wiki says about disableAI:
http://community.bistudio.com/wiki/disableAI
arguments of the given scripting command must be local to the client (computer) on which the command is executed. Check Locality in Multiplayer for more information about locality of objects.
the effects of the given scripting command are not broadcasted over the network and remain local to the client the command is executed on.
A crash caused by a scripting command can in my opinion always be said to be a bug in the game, even when you possibly use the command wrong, so you should check the ArmA Community Bug Tracker if it has an entry for this problem, and if not then create it yourself.
-
Thanks for the reply, Baddo. I know that locality wasn't the issue because when I tested the script in MP, I was the only player running a non-dedicated server, so therefore the script could only be run locally.
Okay, I'll go see if a bug report exists for this. Thanks for your suggestions.
Edit: I tried it again lasta night. This time, I put in a line that checked specifically if the unit was local to the machine. The game didn't crash that time, and the disableAI command worked just fine. How odd. Maybe later, if I'm not feeling lazy, I'll try removing the local check and see if it crashes once again. I don't see how the local check could have made a difference if my original MP test was done with only 1 player (me) that was also acting as the server.