Author Topic: creating point lights via scripting...  (Read 2612 times)

0 Members and 1 Guest are viewing this topic.

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
creating point lights via scripting...
Is it possible and how... icky is it to implement if not?
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: creating point lights via scripting...
That depends on how it's done.

The current system looks really easy to just put in scripting. It consists of a series of "add light" functions, which are reset at the beginning of each frame during a mission. It wouldn't work as a persistent lights system (ie you couldn't control lights like you could cameras, without some extra code anyway).

But yeah, it actually looks really easy to implement if you just want to create point, tube, and directional lights, and a function to reset the lights yourself. I'd also need to add a simulation hook, but that's fine, I planned to add it at some point anyway. You can't use the On Frame hook because it occurs after objects have been rendered but before the light_reset call, and you can't use the object render hook because it executes right after the object renders (Although you can use the override hook. However, it would run for every object, and even though you could check to see if it was rendering the first time that frame and apply your lights then, I figure a simulation hook would be better. Lights will only apply to objects rendered after the lights have been created.)
-C

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: creating point lights via scripting...
i was thinking of using it for the new explosions, and the point of getting them is to use them to behave like normal explosions and weapon effects have on ship shading.
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

  

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: creating point lights via scripting...
Hmm. You could check for them using hooks with the "$Object Type: Fireball" condition, but there's no support for explosions beyond that yet. (You could trigger the lights when they're rendered, but you wouldn't know which explosion it was)

You could also trigger them using other things.
-C