Blender Git Commit Log

Git Commits -> Revision 23f5407

Revision 23f5407 by Mateo de Mayo (master)
August 3, 2015, 22:10 (GMT)
BGE: Added getActionName() function to KX_GameObject()

It works similar to getActionFrame(), you have to give a layer or not (for layer 0) as the argument and it returns the name of the animation that the object is currently playing.


import bge
own = bge.logic.getCurrentController().owner
>> SomeAction

Here is an example file, just open the blend file with the terminal opened
and press P, you can see how the current animation is being printed:

Reviewers: moguri, hg1, panzergame, campbellbarton

Reviewed By: panzergame

Subscribers: campbellbarton, hg1, #game_engine

Projects: #game_engine

Differential Revision:

Commit Details:

Full Hash: 23f54076db6d241af2a8f9404ab5f5b8072a4db0
Parent Commit: 73522e1
Committed By: Porteries Tristan
Lines Changed: +65, -4

By: Miika HämäläinenLast update: Nov-07-2014 14:18 MiikaHweb | 2003-2021