Jump to content
Sign in to follow this  

Recommended Posts

Okay, here's the situation: I want to make some C-47's from I44 have green and red lights (Para mission!) that can be activated with an addAction. At the moment, I have everything working, HOWEVER only the player that activated the 'addAction' can see the lights color change.

At the moment I have two scripts called 'p1red' and 'p1green', which look like the following:

p1red:

light1 = "#lightpoint" createVehicleLocal [0,0,0];

light1 setLightBrightness 0.04;

light1 setLightAmbient [0.4,0.4,0.4];

light1 setLightColor [1,0.2,0.2];

light1 lightAttachObject [p1,[0,-2.5,-0.8]];

light2 = "#lightpoint" createVehicleLocal [0,0,0];

light2 setLightBrightness 0.04;

light2 setLightAmbient [0.4,0.4,0.4];

light2 setLightColor [1,0.2,0.2];

light2 lightAttachObject [p1,[0,1,-0.8]];

p1green:

light1 = "#lightpoint" createVehicleLocal [0,0,0];

light1 setLightBrightness 0.04;

light1 setLightAmbient [0.4,0.4,0.4];

light1 setLightColor [0.2,1,0.2];

light1 lightAttachObject [p1,[0,-2.5,-0.8]];

light2 = "#lightpoint" createVehicleLocal [0,0,0];

light2 setLightBrightness 0.04;

light2 setLightAmbient [0.4,0.4,0.4];

light2 setLightColor [0.2,1,0.2];

light2 lightAttachObject [p1,[0,1,-0.8]];

and in the plane's init I have:

this addAction ["Red On", "p1red.sqf"]; this addAction ["Green On", "p1green.sqf"];

Where have I gone wrong? :/

Share this post


Link to post
Share on other sites

Use code tags :)

And it's because you used "createVehicleLocal", so the lightpoint is only locally created on the player :)

Share this post


Link to post
Share on other sites

Okay will do that in future! :)

I what do I have to write in the 'createVehicleLocal' part? 'createVehicleServer'? I tried 'createVehicle' however it didn't work. It has to work on a Dedicated Server as well... what do I put?

Share this post


Link to post
Share on other sites
Okay will do that in future! :)

I what do I have to write in the 'createVehicleLocal' part? 'createVehicleServer'? I tried 'createVehicle' however it didn't work. It has to work on a Dedicated Server as well... what do I put?

it should be "createVehicle". thats the only thing i've ever used used for creating lights. :confused:

light1 = "#lightpoint" createVehicle getpos aslt1;
light1 setLightBrightness .5;
light1 setLightAmbient[.5, .5, .5];
light1 setLightColor[1.0, 1.0, 1.0];
light1 lightAttachObject [aslt1, [0,0,9]];

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×