Armature with PingPong ?

I notice there isn’t a PingPong feature in the Action area and the bones won’t work with the IPO, so I’m wondering, is there any way of doing a PingPong with the Action ?

You would need to go the long way with properties:

  • Add an int property “frame”.
  • Add an int property “direction” set to 1.
  • Add logic bricks to add “direction” to “frame” for every frame.
  • Add logic bricks to set “direction” to -1 when frame reaches a maximum.
  • Add logic bricks to set “direction” to +1 when frame reaches a minimum.
  • Set the action actuator to property with “frame”. The action actuator must be switched on once (always sensor without pulses).You can name the properties as you like.

Hope this helps

Actually, the action needs to be pulsed. At least in my experiences.

Forgive my ignorance, but how do I hooked them up ? Is this correct ?

The actuator needs to be switched on once. You can do this with the always actuator, which fires one true puls at startup. As always never ends there will be no false pulse and the actuator will not stop.

The Action Actuator should be set to Property. Currently it is play.

Here is my set:

int frame 1
int dir 1
Always   "sInit"   (no Pulse)                   --> AND --> Action   "aPlay" (Property, AC:Action, Prop:frame, Blendin:0, Priority:0)
Always   "sAlways" (true Pulse)                 --> AND --> property "aAddFrame" (Add, Prop:frame,Value:dir)
Property "sLow"    (no Pulse, equal, frame, 1)  --> AND --> property "aDir+" (Assign, Prop:dir, Value:+1)
Property "sHigh"   (no Pulse, equal, frame, 41) --> AND --> property "aDir-" (Assign, Prop:dir, Value:-1)

I’m lazy so I use dir and not direction. You don’t need to name your sensors and actuators. I like the names as it shows me what is doing when the logic bricks are collapsed.

You can enhance this by adding a min and max property and set the propety sensors with them. Then you could use the logic bricks for other objects as well.
You could add logic to switch on off the action actuator, but keep in mind to stop the “aAddFrame” as well.

I hope this helps

That did the tricks, THANKS :smiley: Is “frame” and “Action” somethings that’s built into blender ?

No, frame is just the property you defined earlier.
You can call it whatever you want, but make sure it is the same one you used for counting. Be aware that it is case sensitive “Frame” is not equal to “frame”.

Action is the name of my Action. Better names would be Robot_walk or Player_stand. You can change the name of an action in the Action window. The action actuator will be updated automatically.

The names of sensors, controllers and actuators have a meaning for Python if used and documentation.