Action Actuator in the BGE - how?


I’m trying to understand how to use the action Actuator well.
Are there some demos available somewhere on the forums (I’ve searched but couldn’t find)?
I couldn’t find much tutorials on the internet so I thought that it would be better to ask :


  1. How to mix action 1 (wave hand) and action 2 (walk)?
  2. How to stop action 1 (hanging) and start action 2 (falling)?
    I use priorities for that but let’s say :
    jump action has a priority of 10
    hanging action has a priority of 8 (lower number means higher priority)
    When jumping, the jump action is used, until a ray triggers the hanging action.
    Ok I’m hanging, now I want to fall when I push a key (down) and I need the jump action to show. Problem : the jump action priority is higher than the hanging action’s one.
    When he falls, my character keeps on playing the animation ‘hanging’.

How would you do to stop an action without relying on the priority field?

  1. Also, Id’ like to know how to use the Frameprop field?
  2. What are Loop End, Loop Stop, Play?
  3. How to use Action->Property?

That would be really helpful, thank you very much.

  1. I think you can only mix these with blendin which mixes a number of frames from the playing animation with a new one.

  2. I think you’d need to have a second actuator also playing the jump action but with a different priority to do this.

  3. If the 15’th frame of the animation is playing for example, make this property=15.

  4. Loop end: As long as this animations triggered keep looping, and then when it stops being triggered keep playing just until the end of that cycle of the animation. Loop stop: The same as loop end, but it stops the moment the actuator stops being triggered. Play: Only plays the animation through once.

  5. Normally when you play an action, lets say a 30 frame long one, it starts playing the action from frame 1 and stops at the 30’th frame of that action, eg frame 1,2,3,4,5,etc. With the Property action type, it uses the frame number from the property you enter. For example if you enter “turkey” into the property field and that object has a property called “Turkey” set to 12, it will play frame 12 of the animation.

My two-cent answers:

  1. What you want to do is create animation keys only for the bones involved in each action. To mix them, you simply create two or more action actuators (depending on how many actions you want to mix) and fire them at the same time. So, there are two things you can do: 1) create one walking action in which the player waves his hand and one action in which the player simply walks or 2) create one walking action which involves the basic movement of the legs, create multiple actions for the arms (i.e. “arms_swing,” “arms_wave,” etc.), and fire the legs action with the corresponding arms action depending on what the character is doing at the moment.
  2. Answered by Blendiac
  3. The “Frameprop” field allows you keep track of the current frame being played. Create an ‘Int’ property and type its name into this field. When the action is triggered, the property’s value will be updated.
  4. Answered by Blendiac
  5. Answered by Blendiac

Hope that helps!

That will be really helpful.
Thank you for taking the time.

There is only one thing :

  1. I think you’d need to have a second actuator also playing the jump action but with a different priority to do this.

I have already tried before but I’m not comfortable with this solution : if fall has a higher priority than hanging, then I need to set a ‘idle’ action with a higher one when touching the floor. And then walk action would need a higher one, and if I’m hanging again, higher one, and fall again, etc…
It’s a cycle.
To avoid that, I’d like to stop an action (or reset the player to the default’s action) without changing priorities.

Is that possible?

By not using the builtin priorities. You manually fire them based on your own priorities. I’m developing an engine for this. See post linked here.

There’s nothing usable yet; my intent with this is to give you an idea how how to go ahead with your own plans. ^^ Besides, the thing I make will, as usual, be impossible for anyone to understand, =P

I tried to use the priorities to help me deactivate actions in my third person template, but soon discovered it was highly unintuitive. It is simply best to directly control the state of the actuator. If it isn’t active, it’s inactive (meaning you send it a negative pulse). Otherwise things get confusing. I never have understood the Action actuators…

I see.

Besides, the thing I make will, as usual, be impossible for anyone to understand, =P
That would be perfect as a signature, Raiderium :wink:
Just kidding, the post you’ve made is really informative, thank you for sharing.

The best and easiest way would be the ability to use actions like states : copy/add/sub.
No confusion.

This is a minor issue but I can’t release the template without understanding this.

Please, I need help on this.

I’m having the same problem. I created a legcycle and an arm cycle filled in in the actuators with a same chanel. If a set the arm cycle to have the same or an higher priority (less or equal numerical value) the arms blend in correctly but the legs do not. If i set the legcycle to have higher priority, the they blend in but the arms don’ move at all. Note that there is a third action, with another sensor, the idle cycle, that has a lower priority (an higher numerical value)

Hi Guys,
can someone please explain how I can trigger an action actuator from a python script?
I have an armature which listens for a message, once that message is triggered my script sucks out the body of the message which is the action I want it to play (so the message subject is “WaitForAnim” and the body can be anything, for example, “Idle1”)

So far I’ve got it to the stage where it can filter through what body has come through the message, but I can’t seem to find a way to trigger the action actuator via script.

Can’t wait to hear any feedback!