[Bf-committers] Re: game engine / python controller: get actuator by name, broken
in 2.34? (Kester Maddock)
Toni Alatalo
bf-committers@blender.org
Tue, 10 Aug 2004 15:07:10 +0300 (EEST)
On Tue, 10 Aug 2004 bf-committers-request@blender.org wrote:
> From: Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>
thanks for quick reaction, here another quick one to answer your question:
> > error: TypeError: argument 1 must be KX_GameObject, not str initmover
> > self.animate_act1 = self.controller.getActuator("animate1")
> This is really strange - I tried a simple test and it works correctly. The
> code below definately checks for a string as an argument. The last change
> also just adds the getScript & setScript methods. Can you post more of that
> script?
(as mentioned in the original post), the whole thing is available from
http://studio.kyperjokki.fi/engine/KyperMover . that part is in the
kyperjokki-module, which is
http://studio.kyperjokki.fi/engine/kyperjokki.py
i'm sorry i didn't do a simple test myself, but could not imagine that any
case could be meaningfully simpler than that. i suppose you tested with
the release version. oh and i suppose <levon> used that too -- i haven't
tried 2.34 myself yet (was busy with other things till now, but will take
the time now)
> I did implement the ability to use object references instead of strings for
> the AddObject, TrackTo, and SetCamera actuators.
yay! *hurrays*
> .position is a built in attribute in 2.34.
right. good thing i'm using blenderobject properties position1-n :o
i suppose we'll tell <Pildanovak> that.
> Kester
~Toni