Add object from another layer not generating unique items?

here is the blend -

Geometricity and I have been bouncing back and forth,

I have


import bge

def main():

    cont = bge.logic.getCurrentController()
    own = cont.owner

    sens = cont.sensors['Property3']
    sens2 = cont.sensors['Property4']

    if sens.positive and sens2.positive:




import bge

def main():

    cont = bge.logic.getCurrentController()
    own = cont.owner

    sens = cont.sensors['Property5']
    sens2= cont.sensors['Property']
    if sens.positive and sens2.positive:
        if own['Light']!="Empty":

And I thought this would create unique instances of a light, and remove them, however you can’t seem to add 2 lights at one time, and there is no error thrown…


I think this really is a bug…

Point light


no logic in sphere, just parented to point…

As far as I remember this was mentioned last week or the week before.

Well, I probably don’t need more then 1 of the exact same lamp in a area anyway, but it’s still odd,

I guess unique lights on another layer is the only way to go for now?

The shaders generated for each object have to take each lamp into account, right? So what happens if suddenly, there are more lamps? Well that’s fine, let’s just add one (or actually, activate on that’s deactivated). But what if there’s two of the same light? Shouldn’t it be in the same location, or, what? The shader get’s confused, and only the most recently added light is visible in the shaders.

At least, that’s my understanding, and it’s why I’m still investing time (what time I have) in my lighting manager

@ sdfgeoff: I was thinking about this yesterday, that you’re unique LibLoad method should be a solution.
@ BluePrintRandom: Another option is to have multiple unique Lamps on an inactive layer (for example: [Point.000, Point.001, …]) and add those to the scene. As long as none of the Lamp objects share the same Lamp data this works up to a maximum number of Lamps, depending on how many are supported by your graphics card.

Edit: As been expected the unique LibLoad method does not work with Lamps. Sorry for any misguidance.