0
$\begingroup$

For a game I'm making, I need to make a sensor be positive every time an 'action' animation runs. This is my shooting setup:logic


So how do I check what frame an action is at? Because if this is possible I can make a python script so that when the animation is at frame 1 it does something.

$\endgroup$

1 Answer 1

0
$\begingroup$

You can add a property (float or int) and enter it into the Frame Property field (right lower corner of your image). Then you can check the property with a property sensor.

Be aware that frames are float. Therefore it is better to check against a range e.g. 0.5 ... 1.5 (Interval mode) rather than a concrete value, as it is not likely to match it.

enter image description here

$\endgroup$
1
  • $\begingroup$ It works! I also find it works better if I make the frame property an integer $\endgroup$
    – Jacob_
    Commented Sep 4, 2015 at 15:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .