There’s no need to do that.
My hint solves a problem for which I haven’t found any other solution, beacuse the ‘add object’ fuction needs that the object that you want to copy must reside in a hidden layer.
Otherwise you get an error on the console and the actuator doesn’t work.
Jason, be careful that the layer property is a bitmask, not an integer. It doesn’t mean that 3 is layer 3.
You have to think that every layer that you want to light with a lamp must be a binary ‘1’ and the others are ‘0’, from right to left.
So, for instance, if you have a lamp that you want to affect the first two layers you have to write:
my_lamp.layer = 3 (binary 11)
If you write:
my_lamp.layer = 4 (binary 100)
you’re setting your light to be visible in layer 3 only.
If you write:
my_lamp.layer = 5 (binary 101)
you’re affecting layer 1 and 3, and so on.
It doesn’t make sense to me to put your object on a different scene.
Anyway, I wanted to write this tutorial and I’m writing here to point out that you can’t just use the logic bricks. Sooner or later you have to code some python.
And I think that this is a good thing. Because in this way you can have more control. You can’t write a game, even a simple one, without a minimum of coding.
I also found that in the latest Blender you can import the other blender python modules (not related to the game engine). This is very interesting. Being able to do that you can do a lot of useful, sometimes crucial, things. Like writing your own physics tweaks, having more control on the objects movements.
I am also experimenting with creating meshes on the fly during the game, and editing them. Think about having a cloth that follows your character, or a flag moving with the wind, waves on your water, and so on. Such things are possible on commercial software like Macromedia Director (using the Shockwave 3d functions).
In the 2.33 release of blender, importing modules other than GameLogic gave an error on the console.
Are you interested in a tutorial on these topics?
Write to me.