generate() and announceGenerate() doubt

So, I’m still working around the code I downloaded from [url]DistributedNode]

According to the comments from that code generate() and announceGenerate() works as follows:

    def generate(self):
        """ This method is called when the object is generated: when it
        manifests for the first time on a particular client, or when it
        is pulled out of the cache after a previous manifestation.  At
        the time of this call, the object has been created, but its
        required fields have not yet been filled in. """ 

    def announceGenerate(self):
        """ This method is called after generate(), after all of the
        required fields have been filled in.  At the time of this call,
        the distributed object is ready for use. """


So, when one of the actors gets “killed” I want them to respawn completely healed in some random position.
My respawn method is:

    def respawn(self):
        # Disable follow cam and remove healthGUI
        # Disable our current avatar. Actor is cacheable

        # Generate random respawn position
        x = uniform(-150, 150)
        y = uniform(-150, 150)
        # Set position in local client,y,0)
        # And let the other clients now my new position,y,0)
        # Set health, both for ourselves and the rest of the clients
        # Look forward
        self.followCam = FollowCam(,
        self.healthGUI = OnscreenText("Health " + str(,\
                            bg=Vec4(1,1,0,1), fg=(0,0,0,1), pos=Vec2(-1.0,-0.8))
        self.moveTask = taskMgr.add(self.moveActor, 'moveActor')

I have set the DistributedSmoothActor class as cacheable so that when I call disable it doesn’t call delete (at least that’s what I assume has to be done from reading code documentation)

Here are the overriden generate() and announceGenerate
for the DistributedSmoothActor class:

    def generate(self):
        # We can start smoothing right-away
        self.activateSmoothing(True, False)
        taskMgr.add(self.doSmoothTask, "smooth task")

    def announceGenerate(self):
        self.reparentTo(render)"walk", 5)
        if (self.getStanding()==0):

So, a few weird things going on here:
1- The actor indeed respawns in a random position. However is almost instantly “teleported” to position (0,0,0).
2- The smoothing is not being done
3- Even though I call setHealth and it’s distributed flavor in respawn(), the actor’s health remains 0. I know this as I get an error when I “shoot” at him saying I’m calling setHealth() inside the function that’s called when an actor is hit by a bullet with an invalid value of -5 (each bullet drains 5 health from the actor).

Any thought on what am I missing here? I still don’t quite fully understand when and how are generate() and announceGenerate() are called. Furthermore, if got this right, announceGenerate() is supossed to be called when all required fields have been set: do these need to be explicitely set by the client or can they be set in the distributed class constructor.