Home   Help Search Login Register  

Author Topic: Array of new vehicles from server to client  (Read 877 times)

0 Members and 1 Guest are viewing this topic.

SSG Plazmoid

  • Guest
Array of new vehicles from server to client
« on: 30 May 2003, 12:09:34 »
Why can't I pass an array of newly created vehicles from the server to the client via a public array.

I set vcl1 thru vcl5 = objNull on client and server
I create my vehicles vcl1 thru 5
I create an array called vehicles

~.5
vehicles = [vcl1,vcl2,vcl3,vcl4,vcl5]
PublicVariable "vehicles"


oh wait looking at the command ref answered my question I believe. PublicVariable doesn't support arrays... So is it legal to create a vehicle on the server and make the vehicle name public so the client can get it.

vcl1 = objNull
vcl1 = _vehicleType createVehicle getpos someObject
PublicVariable "vcl1"

create more vehicles, etc. etc.
createVehicles = true; PublicVariable "createVehicles"

does someone have a better way to get the object IDs from the server to the clients?

thanks,
Plaz

Offline Doolittle

  • Contributing Member
  • **
  • _this select 0
Re:Array of new vehicles from server to client
« Reply #1 on: 30 May 2003, 17:39:33 »
Try the CoC Network Services...

Doolittle

Offline CrashDome

  • Members
  • *
Re:Array of new vehicles from server to client
« Reply #2 on: 07 Jun 2003, 18:19:52 »
Another possibility:

Take your array of objects and use this line

Code: [Select]
{Publicvariable "_X"} forEach yourarrayname