Question: .playAction() and "flipper"?

Hi everyone,

Can you do a flipper animation using .playAction()? It’s not listed as one of the constants but I thought maybe there would be a way around it.

try KX_etcetc_PINGPONG? (or whatever it’s called, I closed the page, haha)
otherwise, I dunno, may as well just manipulate and activate an actuator. =P

the thing is pingpong plays it and then immediately un-plays it, i need it to hold basically. Yeah I might just use actuators.

if property changed--------------------play animation(property)

(setting property sets animation frame)

:stuck_out_tongue:

actor[‘Anim’]=1

if keyPress X---------------and-------add 1 to anim
if Anim min:0 max:14----/

keypress x invert---------and-------add -1 to anim
if Anim min:1 max:15–/

try the demo (hit space then hold, then let go)

you can replace the keyboard with a property

Attachments

MoveUnmoveDemo.blend (428 KB)

Flipper is for the Actuator, as it is a reaction on activation/deactivation.

A Python controller is no actuator. You have to implement the logic by yourself e.g. by playing the animation reverse.

The price for more flexibility is … more work ;).

Haha yeah. I’ll just use actuators for it won’t make much of a mess anyway.