Home   Help Search Login Register  

Author Topic: Commands in MP  (Read 1991 times)

0 Members and 1 Guest are viewing this topic.

Rubble_Maker

  • Guest
Commands in MP
« on: 24 Jan 2003, 14:05:58 »
Hi

Need to know if the following commands take effect on ALL machine or on the client which executes the command only:

   setdir
   setVelocity
   setpos
   drop
   RemoveWeapon
   RemoveMagazine
   SetFuel
   showCompass/Map/Radio&GPS...
   DeleteVehicle
   say
   inflame

thx

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Commands in MP
« Reply #1 on: 24 Jan 2003, 18:15:11 »
All of those will affect all machines--host and clients--except maybe drop and say.  For those two, I'm not sure if they affect all machines--someone else will have to clarify.
Ranger

Rubble_Maker

  • Guest
Re:Commands in MP
« Reply #2 on: 25 Jan 2003, 10:12:51 »
thx!

yes, someone else confirmed me on that; only drop and say is local.

Rubble_Maker

  • Guest
Re:Commands in MP
« Reply #3 on: 25 Jan 2003, 16:12:07 »
one more question tho: the "init" eventHandler currently runs on the client only (BIS might change that in a patch tho). How about the other eventhandlers, like "Fired" or "Damaged", are they local also?

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Commands in MP
« Reply #4 on: 26 Jan 2003, 00:13:56 »
I don't know, but I would guess that those would have to be global.  Hopefully, someone else knows for sure.
Ranger

Stix

  • Guest
Re:Commands in MP
« Reply #5 on: 27 Jan 2003, 01:38:04 »
one more question tho: the "init" eventHandler currently runs on the client only (BIS might change that in a patch tho). How about the other eventhandlers, like "Fired" or "Damaged", are they local also?

look in the com ref there are 2 more that are local rest are global

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Commands in MP
« Reply #6 on: 27 Jan 2003, 17:41:00 »
Well, about the mp-commands, and wether they are global
or local;

You can't lay a general rule on that, because it depends also
on the way of how you execute those commands. Also it
depends on the objects involved and on variables and how
the values of these variables were created.

e.g: setpos may look like a global command, but if you run
a script on each client to create random numbers, to specify
the coordinates, you may run into different results.

Let's say you want to setpos a marker (setmarkerpos), and
you predefined 3 locations where to setpos it. Now you run
a script, which creates a random number 1 2 or 3.
If this script runs on each client, there will be different result
which will cause different marker positions for each client.

So setpos/setmarkerpos can be global, if the coordinates are
equal, but the command is still executed local for each client.
If the coordinates don't match, the result doesn't either.

Say: might be also a local executed command, because if
you create a trigger with a radius, activated by anybody
present - onActivation: xxx say "xxx", only clients inside
the trigger area (where the trigger condition does match)
will be able to hear the SAYings.

deleteVehicle should be executed server side, or this even
could lead into a game crash.

Inflame: is also a local command - just try to light or clear
a fire and ask another player, if this did take effect on
his fire.

RemoveWeapon/RemoveMagazine should be global since
BIS fixed this in one of the patches.


I suggest you to test all this stuff by executing all these
commands server side only and then ask other players, if
they can see any effect of the commands.
If server side only execution still works for the clients, then
the command was executed global, if not  ;D

:edit - ah yeah and here's what BIS says about event handlers
in multiplayer:

Code: [Select]
MP notes: "Killed" and "Hit" event handlers are executed where given unit is local. All other event handlers are executed on all computers. Events added by addEventHandler may be different on each computer.

~S~ CD
« Last Edit: 27 Jan 2003, 17:50:11 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted