Add object Naming. i think its delayed

im trying to make a splash object set up and i ran into a problem. my plan is to add the splash object and set its location via script. but it seams that there is a delay in the naming prosses, because the first time the script is run the object is created, but the position is not effected, the second time the scipt is run another object is created, and the original objects position is chaged. and if the script is run a third time the original object is moved and a third object is created. Im wondering how i can change my script to make it work.


Water.blend (495 KB)

I haven’t looked at it, but imagine you are using the addObject actuator to add it by using “cont.activate()”?
What you can do is use instantAddObject instead.
act = cont.actuators[“addObject”]
actObj = act.instantAddObject()
actObj.position = pos

I think. Have a look at the API, I’m going from memory here.

import bge
if hit.positive:

PS: check ever the consolle , that must be “black”!