Jump to content
Sign in to follow this  

Mast lights on Fishing Boat

Recommended Posts


I've got an object on the map Editor---->Ship------>Fishing Boat

The lights on the mast are not working at night. I've tried varies night times, no go.

So, is there a way to get them to work?

Do I need to attach a light source?

Most colors for these mast are RED and GREEN.

Here is a pic:



I have a night scene for my Intro with a squad in Cargo going to the pier. It's completely dark without some sort of lights.

I do like to use GameLogics to light up building and airports. Simple to use, just place them down on the map.

Could I attach one to the mast area of the Fishing Boat?

If possible, the setLightColor has to be changed to green.

Not sure of the code. This one shows white.

Game logic

light = "#lightpoint" createVehicleLocal position this; light setLightBrightness 0.06; light setLightAmbient[0.1, 0.1, 0.1]; light setLightColor[1.0, 1.0, 1.0]; light lightAttachObject [this, [0,0,2.5]]; 

Thanks for your help!


Share this post

Link to post
Share on other sites

light setLightColor [0, 1, 0] = green light

light setLightColor [1, 0, 0] = red light

light setLightColor [0, 0, 1] = blue light



Its a R.G.B pattern color.

Share this post

Link to post
Share on other sites

You can add this event handler to the player and shoot at the lamp/mast. If you're lucky and the bullet does not go through, the light will stick there and a hint will show you the position ATL of the light. You may then use that to get the position of the light relative to the ship using the modelToWorld command.

light = objNull;
eh_fired = player addEventHandler ["Fired", {
    _bullet = _this select 6;
    deleteVehicle light;
    light = "#lightpoint" createVehicleLocal getPosATL _bullet;
    light setLightBrightness 0.06;
    light setLightAmbient [0, 1, 0];
    light setLightColor [0, 1, 0];
    _bullet spawn {
        while {alive _this} do {
            light setPosATL getPosATL _this;
        hintSilent str getPosATL light;

I tried to add a "hit" event handler to the object I was shooting at, but it did not seem to work. Otherwise, I'd already have made the code so it gave you the model position, but I hope this helps you, too.

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