[Bf-committers] game engine / python controller: get actuator by name, broken in 2.34?

Kester Maddock bf-committers@blender.org
Tue, 10 Aug 2004 21:48:29 +1200


Hi Toni,

On Tuesday 10 August 2004 18:48, Toni Alatalo wrote:
> greetings.
>
> has something changed in the python controller component of the game
> engine in 2.34? when <levon> was trying out a system i've made, it gave an
> 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?

> [SNIP]
>
> ~Toni
>

> btw: Kester, have you done anything / some thoughts about the
> passing object references to actuators -issue that we discussed some time
> ago? i afterwards rembered that the problem is preventing the use of
> camera/tarck-to actuators also in my system (not only in that of a
> friend). my understanding was that satisfactory and feasible solutions
> were found, but guess that no-one just hasn't implemented them yet. or
> have you, and it is even related to this other problem now?-o
>
I did implement the ability to use object references instead of strings for 
the AddObject, TrackTo, and SetCamera actuators.
> P.S. in another VJing system, by <Pildanovak>, there is another problem
> occurring in 2.34 (also discovered by <levon>, who posted about it to
> http://www.blender.org/modules.php?op=modload&name=phpBB2&file=viewtopic&t=
>3202&postdays=0&postorder=asc&start=30 ). he's doing own.position =
> own.position+(velocity / 20) .. somewhere, and somehow before that the
> own.position has become a list, instead a number, in 2.34 so it gives
> "TypeError: can only concatenate list (not "float") to list". he's using
> messages to control the speed of an ipo.
.position is a built in attribute in 2.34.
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers
>
>
>
> !DSPAM:411895bb59015996383924!

Kester