Jump to content
Sign in to follow this  
Fluit

Scripted searchlights

Recommended Posts

I'm trying to script in a searchlight on top of a radio tower.

I was able to attach a lightpoint to the tower using the following code

_light = "#lightpoint" createVehicle _pos;
...
_light lightAttachObject [_tower, [0,0,18]];

The problem I'm facing now is to make the lightpoint act as a spotlight.

In game design terms this would be called a "reflector light"?

This means adding a cone to direct the light to a certain direction.

In the configviewer, where the actual models for spotlights are visible, I can see this is done by innerAngle and outerAngle.

More info about this here: http://forums.bistudio.com/showthread.php?155462-Reflector-lights.

So my question is:

How can I set the innerAngle and outerAngle to the _light object?

Yours,

Fluit

Share this post


Link to post
Share on other sites

You can't spawn spotlights, only pointlights.

You also can't convert pointlights into spotlights.

Use one of the pre-existing lamps. That is the only way unless you make/use an addon with custom lights.

Share this post


Link to post
Share on other sites

Not at all Katipo66, looks like we're looking for the same thing, so let's hope we can find a solution!

Share this post


Link to post
Share on other sites

Here's how I did it from the editor:

Stick a lightpoint 50m below an invisible 50m high flying Darter drone and let it fly an S&D pattern with cycle.

Or spawn a constructionlight and let it aim at the drone from a while [true] cycle of a script.

Edit: Ah this was already mentioned at the above link.

Share this post


Link to post
Share on other sites

I want to create the lighting similar to the lighthouse lights.

Basically a horizontal light beam.

So this drone is not realy a solution here, but appriciate the effort.

I'm gonna keep on looking.

Also voted on the feedback tracker!

Share this post


Link to post
Share on other sites

Hmm, you could probably achieve something similar to the lighthouse beam with a particle effect.

Surely won't be easy to get it to look nice but it might be worth a try.

Share this post


Link to post
Share on other sites
Here's how I did it from the editor:

Stick a lightpoint 50m below an invisible 50m high flying Darter drone and let it fly an S&D pattern with cycle.

Or spawn a constructionlight and let it aim at the drone from a while [true] cycle of a script.

Edit: Ah this was already mentioned at the above link.

Yes, I've attached every lamp object in the editor minus the kitchen sink but none produce the beam effect, I'm starting to think that the beam is actually an object, Even the light house beam looks to be an object? Have to look a lot closer next time I'm in game.

Share this post


Link to post
Share on other sites
Yes, I've attached every lamp object in the editor minus the kitchen sink but none produce the beam effect, I'm starting to think that the beam is actually an object, Even the light house beam looks to be an object? Have to look a lot closer next time I'm in game.

Why not request BI come up with a controllable spotlight. For example, Empty>Static>Spotlight. That can be controlled by a UAV operator. Even make an Autonomous version in order to provide one that scans a certain location by it's self, maybe by selecting an option of different patterns.

Share this post


Link to post
Share on other sites
Why not request BI come up with a controllable spotlight. For example, Empty>Static>Spotlight. That can be controlled by a UAV operator. Even make an Autonomous version in order to provide one that scans a certain location by it's self, maybe by selecting an option of different patterns.

That's a different issue. You're asking to add a controllable searchlight to the drone itself.

This thread is about adding scripted lights.

At the moment we can only add "lightpoints" but no spotlights.

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  

×