Jump to content
Sign in to follow this  
cobra@pulse

Flashing lights

Recommended Posts

Hello there all!

Just a quick question, how would you have lights flashing on and off, pritty quickly, with red, to white then nothing, red to white, nothing etc.

I believe its just a simple script but knowing it may be very useful for me.

Plus, I know this isnt the addons forum, (if you have to move, go ahead) but what type of addon would you recomend for that type of idea?

Any help greatly aprecciated.

Cheers

Cobra

Share this post


Link to post
Share on other sites

Two game logics.  logichigh and logiclow.  Logichigh goes where you want the lights, logiclow goes underground.  Loop a script continually setposing the lights to each location.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_lspot = _this select 0 (logichigh)

_lground = _this select 1 (logiclow)

_red = _this select 2 (red light)

_white = _this select 3 (white light)

#red

_red setpos [getpos _lspot select 0, getpos _lspot select 1, getpos _lspot select 2]

_white setpos [getpos _lground select 0, getpos _lground select 1, getpos _lground select 2]

~1

#white

_white setpos [getpos _lspot select 0, getpos _lspot select 1, getpos _lspot select 2]

_red setpos [getpos _lground select 0, getpos _lground select 1, getpos _lground select 2]

~1

#none

_white setpos [getpos _lground select 0, getpos _lground select 1, getpos _lground select 2]

~1

goto "red"

Something to that effect. Adjust the times/names. Thats what I thought of at first, so I don't know if the script will actually work or not. Been a while since I wrote and used one. But that should be the general cocept to get a changing light.

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  

×