OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: GeneralCoder on 16 Aug 2003, 09:14:05
-
Hi I wanted to use public variable to share array wich holds all the players in multiplayer like this in init.sqs:
comment" players is inited as players = [] in else where before this part gets executed"
players = players + [player]
PublicVariable"players"
Put that doesn't seem to work, so can't arrays be public?
Acording to command reference only types Number, Boolen, Object and Group are suported!
What type is player anyway? should be unit wich is object..?
ADD:
Just rememberd that I also need to update marker colors in client computers, but how?
-
players = players + [player]
PublicVariable"players"
Put that doesn't seem to work, so can't arrays be public?
Acording to command reference only types Number, Boolen, Object and Group are suported!
An array is not a number, boolean, object, or group. An array is a separate data type. You can't publicVariable arrays.
To change a marker's color you could do something like this..
markerColors = ["","ColorRED","ColorBLUE","ColorBlack"]
marker1Color = 0
;; script that waits for marker 1's color to change
#start
@marker1color > 0
"markername" setMarkerColor (markerColor select marker1color)
marker1color = 0
goto "start"
And to change the color for everyone, just have 1 client execute:
marker1color = x; publicVariable "marker1color"
-
An array is not a number, boolean, object, or group. An array is a separate data type. You can't publicVariable arrays.
To change a marker's color you could do something like this..
markerColors = ["","ColorRED","ColorBLUE","ColorBlack"]
marker1Color = 0
;; script that waits for marker 1's color to change
#start
@marker1color > 0
"markername" setMarkerColor (markerColor select marker1color)
marker1color = 0
goto "start"
And to change the color for everyone, just have 1 client execute:
marker1color = x; publicVariable "marker1color"
Ok so no change sending arrays... thanks for that marker exampe though!
-
Ok so no change sending arrays... thanks for that marker exampe though!
There is a chance for transfering arrays
Check out CoC Network services and you'll see ;)
http://www.website.thechainofcommand.net/
~S~ CD