OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: xylaz on 11 Aug 2005, 19:05:25
-
Is it possible to execute scripts on vehicles created on local server, in way that every player could see effects of this scripts? Vehicles created on local server are visible and useable to all, but scripts executed on them are not. I was thinking about condition of local player to activate those scripts but dont know how to mix it with scripts to create vehicles with local server condition.
-
Could you be more specific? Please say exactly what you are trying to do.
-
Im using respawning manned vehicles, like bmps, tanks etc. I do this by scripts. In script i use ?local server condition and createvehicle, create unit commands. This vehicles gets local variable _obj when respawning. When i try to use other scripts on this variable _obj, like explosions, fire effects, or other external scripts, then this doesnt work on dedicated server, it works only in editor. Or in fact it is working but players cant see it. Thats what i want to change.
-
In the script creating the units, don't run the whole script only on server, just run the creation lines only on server. Then after creating the vehicle, write:
vehicle1 = _obj
publicvariable {vehicle1}
~1
[vehicke1] exec "script1.sqs"