Property sensor doesn't always work ;(

Hi I have a action actuator that stops at frame 660.
The action actuator assigns the current frame to the property ‘frame’.

I have a sensor that checks if the property ‘frame’ is equal to 660:

When the action is finished the frame is 660 so the property ‘frame’ is also 660. Until here everything works…
But now,
sometimes (I think 10% of every time) the sensor doesn’t give a signal when the frame property is equal to 660…

This is pretty frustrating…
I think I explained clear enough what the problem is… I don’t upload a .blend since then I have to upload my whole game :S …
I can make a simple .blend with the same problem and upload it but I don’t have time anymore today. Maybe tomorrow.

Do you know what is happening?

I have noticed you need
660 - 661

(the property is a float not a int)

try changing the property to int?

Hi! I don’t know if it can help but you can use “actuator” sensor to detect the end of an action (if action actuator is not active: do something):

If the animation can play past that frame, it is possible that it will step over that frame, and the property will never equal that value, especially if the framerate drops below the animation framerate.

Better to use the actuator sensor, or Python. (or change your Action settings)

It works perfectly if you set that frame value as an integer

I agree with youle measuring the end of the play is in most cases better with the actuator sensor. You do not need to enter the end frame twice (at the actuator and ant the sensor).

Unfortunately using the actuator sensor is not that trivial. But no worry it is described in How to: create Action sequences with logic bricks - the power of the ActuatorSensor

I have noticed you need
660 - 661

(the property is a float not a int)

try changing the property to int?

BPR, How did you noticed that?
The property ‘frame’ is an integer.
Anyway, thanks for your help !!

I didn’t tested it out yet, but I think the way youle, agoose77 and Monster described should work.
Thanks guys, you’re all awesome.

another method that is easy

if property min: 1 max:end frame -1--------and----------add 1 to property frame

if frame !=0---------and------------play action in property mode

if you manipulate the property yourself, it locks animation and logic together
so you KNOW it will work, without alot of python.

playing the animation = setting the property to 1