Home   Help Search Login Register  

Author Topic: local objects and public effects?  (Read 1575 times)

0 Members and 1 Guest are viewing this topic.

Offline xylaz

  • Members
  • *
    • Dark Hunters
local objects and public effects?
« 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.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re:local objects and public effects?
« Reply #1 on: 11 Aug 2005, 20:46:42 »
Could you be more specific?  Please say exactly what you are trying to do.
urp!

Offline xylaz

  • Members
  • *
    • Dark Hunters
Re:local objects and public effects?
« Reply #2 on: 11 Aug 2005, 23:26:45 »
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.

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
Re:local objects and public effects?
« Reply #3 on: 12 Aug 2005, 12:01:55 »
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"