Edit Object Actuator Add Object

Hi, i need to add an object in my scene when something happens, for example a click in other object.
For example a click in object A makes object B appear, i have object B in layer 2.
I have a click sensor and a mouse over sensor in object A, an Edit Object Actuator-Add Object called act and a python controller to detect the clicks and to add the actuator:
GL.addActiveActuator(act,1)
In the field OB of this actuator i write object’s B name, and in the field Time i set for ex 80.
So the sensors, python controller and actuator runs on object A.
That’s all i have in the scene concerned to the objects A and B ( i hope)

This is not working and don’t know why,
no errors in the console, it passes through this:
GL.addActiveActuator(act,1), but nothing happens

I’ve only experimented a little with add object. Might be different in this new change. Anyway, what I do is start a new project, set up a cube, then another cube. I put the other cube in another layer. Then I use a keyboard sensor with an up arrow, tied to an “and” controller tied to the edit object. I get that working, play around with it. Then I start with a python controller instead of the “and” controller and get that working. When I’ve gotten that far I move to my real program and write a script for what I’m trying to do.

What are the objects? Object B will be added at object A’s location. It is possible that it is adding it but you cannot see it because it is hidden inside object A. Add a print statement before GL.addActuator to make sure it is really getting to that point. print “test” or something.

Currently I’m leerning pytho in blender for realtim use. I coded 1 big controller script that works really good. On 1 object it does:

  • forwards movement
  • turning
  • rotate the turret
  • shoot objects

Things I need to add are:

  • only moveable on collision with the ground
  • Exploding when armor is done
  • upgrade system for weaponnary
  • message console

De add object actuator with python works fine. I use with this project totally blender 2.35.
First I didn’ believe it was faster then 2.25, because 2.25 games where running slow, but this is because of the incompatibility. If you redo a game totally in 2.35, it’s really fast. The new engine could handle 30 actors with box bound build as a tower that felt down. :slight_smile: Still 60 fps.