Jump to content
Sign in to follow this  
spudly

Street lights

Recommended Posts

This is driving me insane.

If I use the CJTF101 mod to place a streetlamp down on the map, how can I get it to turn on?

I've scoured the net searching and the only answers I can find don't seem to work. That could be because a) they don't work or b) I'm not using them correctly.

How can I place an instance of "Land_StreetLamp_F" (as best as I can determine) onto the map and have it turned on please? I thought I was onto something, when I used a GameLogic object and placed

{_x switchLight "ON"} forEach ((getPos this) nearObjects ["Land_LampStreet_F",200]);

into the init, but it's still not working. What am I doing wrong please?

Share this post


Link to post
Share on other sites

i had the same problem but i used the LampHalogen

set out a gamelogic and call it lampspot and it should work

set this in init.sqf

if (isServer) then {

_lamp = createVehicle ["Land_LampHalogen_F", getPos lampspot,[], 0, "CAN_COLLIDE"];

};

If you want the street lamp instead use this in init.sqf

if (isServer) then {

_lamp = createVehicle ["Land_LampStreet_F", getPos lampspot_1,[], 1, "CAN_COLLIDE"];

};

Share this post


Link to post
Share on other sites
i had the same problem but i used the LampHalogen

set out a gamelogic and call it lampspot and it should work

set this in init.sqf

if (isServer) then {

_lamp = createVehicle ["Land_LampHalogen_F", getPos lampspot,[], 0, "CAN_COLLIDE"];

};

If you want the street lamp instead use this in init.sqf

if (isServer) then {

_lamp = createVehicle ["Land_LampStreet_F", getPos lampspot_1,[], 1, "CAN_COLLIDE"];

};

Yonose, thanks very much for that. I just found this thread which gave a very similar solution.

Rather than inserting that into the init.sqf, I placed it into a GameLogic object and used just the

_lamp = createVehicle ["Land_LampStreet_F", getPos lampspot_1,[], 1, "CAN_COLLIDE"];

in the init of the GL, which worked like a charm. Thanks so much.

Share this post


Link to post
Share on other sites

@spudly

I just added a game logic and added the code you mentioned into the init field, Nothing shows up.:

_lamp = createVehicle ["Land_LampStreet_F", getPos lampspot_1,[], 1, "CAN_COLLIDE"];

Then I tried using this:

if (isServer) then {
_lamp = createVehicle ["Land_LampStreet_F", getPos lampspot_1,[], 1, "CAN_COLLIDE"];
};

Edited by starstreams

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  

×