Logic Bricks - trigger armature action from parent object

Hi everybody,

i’m trying to make a simple 2D kind of sideroller and ran into the followinf problem:
i made a character setup as suggested in Monsters “BGE guide to Character Setup”,
i have a simple cube that acts as the physics proxy and parented an armature to it.

Now i 'd like to trigger the armature actions by the keyboard sensor of the physics object using logic bricks,
but i just can’t manage to get the keyboard sensors of the cube AND the armature action actuators visible in the
logic editor sametime to connect them, even if both objects are selected in the 3D window.

i guess this questino has been asked 100 times, so if you know a link to a corresponding thread … or
you know the trick … please let me know

BTW, i’m aware of the message system but i’d prefer to control the armature directly …

THX and keep blending,
defstone

Attachments

2DGames10_FSM_Test.blend (1.41 MB)

BTW, i’m aware of the message system but i’d prefer to control the armature directly …

I’m afraid you can not link them due to using states. so your stuck with messages, or you need to convert it into python.

Hi Cotaks,

thank you for taking a look !
ok, the states… so is it because the armature does not share any states with the cube?

i tried the same thing in a fresh .blend where everything was default, a plane, a cube and an armature
and all the sudden i was able to trigger the armature action from the keyboard sensor of the cube …
even though i added a mini state machine to te cube… confusing, isn’t it ?

I attached the fresh .blend for convenience …

thankx,
defstone

Attachments

bge_test2.blend (443 KB)

I played around with your file.

It looks like a strange illogical behavior of Blender (2.79). Selecting multiple Objects show all of them in the logic editor (Floor + PlayerProxy). Sometimes only the current object (PlayerProxy + Floor). This happens to StreeLamps too. Right now I can’t see a relation to any settings.

Maybe it is because of the objects are in different layers? -> no, layers have no effect.

I still can’t tell why that happens. But I can offer a workaround. The issue seams to be in the scene.

It seams it works fine when I

  • create a new file
  • remove all objects from scene
  • append all objects from your demo file into the new file (be aware they are now all on the same layer)

Hey Monster,

thanks for your reply ! Although Cotaks states thing also sounded reasonable, it was my guts feeling too,
that the behaviour is not really intended or logical …

I think i’ll try to import everything into a fresh .blend and go from there …

Thanks everybody, keep blending !
defstone

ok, the problem was a kind of damaged / corrupted scene, after following Monsters advice and re-importing
everything into a fresh .blend, the logic editor behaves as expected and i’m able to control the player’s armature
with the sensors of the parent object a.k.a. physics proxy

I’ll post the game in the WIP section as soon as it has the basic look and feel i’m shooting for.

Thanks for helping me out, appreciate it a lot !
regards,