Tried creating moving lights script with some success I just don't think engine was meant to deal with this.
![lol :lol: :lol:](/forums/smiles/icon_lol.gif)
Random other lights in the screen turn to literal black and framerate kinda drops (could be my computer being shit though). But moving props are a possibility, it looks pretty smooth too.
Here's what I did:
so i wanted to have light move from x -40 to x -47 and back again, created 2 events and triggers to listen for them, and a FLOAT variable (with 0.01 initial value).
event1
IF lightpos is greater or equal to -7
add -0.01 to lightpos
move prop light (x + lightpos, y, z)
send event1 after 0.01 delay
ELSE
send event2
event2
IF lightpos is less than or equal to -0.01
add 0.01 to lightpos
move prop light (x + lightpos, y, z)
send event2 after 0.01 delay
ELSE
send event1
There's probably more elegant way to do this, but didn't bother much with this since I saw engine deals poorly with lights moving. Could be useful for other things like vehicles and such though.