OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: SSG Plazmoid on 30 May 2003, 12:09:34

Title: Array of new vehicles from server to client
Post by: SSG Plazmoid 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
Title: Re:Array of new vehicles from server to client
Post by: Doolittle on 30 May 2003, 17:39:33
Try the CoC Network Services...

Doolittle
Title: Re:Array of new vehicles from server to client
Post by: CrashDome on 07 Jun 2003, 18:19:52
Another possibility:

Take your array of objects and use this line

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