Home   Help Search Login Register  

Author Topic: Does disableAI work in MP?  (Read 1253 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Does disableAI work in MP?
« 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?
Ranger

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re: Does disableAI work in MP?
« Reply #1 on: 08 Oct 2007, 21:30:55 »
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

Quote
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.

Quote
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.
« Last Edit: 08 Oct 2007, 21:34:48 by Baddo »

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re: Does disableAI work in MP?
« Reply #2 on: 09 Oct 2007, 15:59:50 »
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.
« Last Edit: 09 Oct 2007, 23:34:05 by Ranger »
Ranger