Jump to content
emrak

Local/global network question

Recommended Posts

  1. BIKI says createVehicleLocal is a local command and generates a local object with no data transfers over the network in a multiplayer game.
  2. There is no "deleteVehicleLocal." In fact, there are no other *VehicleLocal commands at all (I.E., no "setVehiclePositionLocal").
  3. BIKI says deleteVehicle and setVehiclePosition are global commands which delete and move objects.

 

So--assuming this code runs on a player's computer--if I create an object via createVehicleLocal, then move the object via setVehiclePosition, then delete the object via deleteVehicle, am I ever leaving the player's computer and transferring info over the network to the server? Bottom line: if I invoke anything using a local command and then modify/remove it with a global command, is there ever any network traffic?

Share this post


Link to post
Share on other sites

no, the object only exists on that clients machine, if you try to delete the vehicle from another machine it will spit out a script error with undefined variable (since that client doesn't have the pointer to the object since it didn't create it and no information was passed to it over the network about the object). 

 

the local command can be used to determine if the vehicle is local to the client, and the deleteVehicle myLocalVehicleVar will only work on the client that has myLocalVehicle variable defined.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×