Multiple Light Caster

  • Thread starter jap pagcaliwangan
  • Start date
J

jap pagcaliwangan

Guest
So basically, I have a control object that allows me to set an object as a light caster and all other objects that are child objects of the control will be light castees. Im trying to figure how I can have multiple light casters using this simple engine. So far, I have done this by duplicating the control object and assigning another object as a caster.

The problem is, the object that is assigned as caster must already be created when the room starts. ie. obj_player or some other static objects. But lets say, I want an explosion animation to be a caster as well, but I can only have an explosion when there is a collision happens and have that explosion object be destroyed after it finishes its animation. And how do I have multiple explosions be light casters at the same time? To understand my query further, I have linked my project file.

Here is my project file: https://drive.google.com/open?id=0B2SZdyVcA3UVb3ZDeVV3N2Y5am8
 

Yal

🐧 *penguin noises*
GMC Elder
Are your engine using static lighting? Because in that case, it'll only be able to use static light sources. You could always run the light-create code again whenever you create or destroy a temporary light source, I guess (deleting tiles/objects that handles darkness if you use an approach like that).

Also, feel free to check out MariaEngine, it has a dynamic light engine (seen in the second level of the demo) that should be fairly easy to rip out and put in another game.
 
J

jap pagcaliwangan

Guest
Are your engine using static lighting? Because in that case, it'll only be able to use static light sources. You could always run the light-create code again whenever you create or destroy a temporary light source, I guess (deleting tiles/objects that handles darkness if you use an approach like that).

Also, feel free to check out MariaEngine, it has a dynamic light engine (seen in the second level of the demo) that should be fairly easy to rip out and put in another game.
I use a dynamic light engine as well.
 

Yal

🐧 *penguin noises*
GMC Elder
Then why doesn't it adapt to new casters being created...?

Could you explain how you're actually doing things a bit more? I'd love to keep guessing, but it's not the best use of mine or your time.
 
Top