Action actuator questions

I decided to finish finish the turret defense tutorial series by Goran, which i hadn’t finished because i upgraded my os and forgot to save! so i redid it, but at this part (http://www.youtube.com/watch?v=MB3mFA90K0k&feature=autoplay&list=PL363669892084DD09&playnext=2)
I am stuck, the action actuator doesn’t return to 1, so it doesn’t work? Answers are most helpful and greatly appreciated : )

How do you have your playback setup. Is it just play or looped. If it is just play then the last frame of your animation will be your value for your property. If you loop it then your value will reset. Make sure your frame starts at 1.

I tried setting it to play, loop stop and loop end, none of them gave the desired result.

do you have a .blend you can post?

Sure thing, here it is!

Turret Defense Tutorial.blend (465 KB)

Basically your first logic chunk is your problem. You have a keyboard sensor and property sensor feeeding into an ‘and’ controller which is driving your action. The second your keyboard is false or your property is greater than one your logic is false because with the ‘and’ controller both sensors need to be true.
I would create another logic step which checked to see if the animation frame was at 30 if it was and the player is not pressing spacebar reset the frame property to 1.

Also keep your action set to “play” and uncheck continue, this way it forces the whole animation to play and the player cant shoot again till the action is done and he/she has let go of spacebar.


What should this extra logic step be? I’m not very proficient with the logic bricks yet. I can understand why its not working, i just don’t know what i should do to fix it. Please suggest what i should do?

Never mind, worked it out then noticed your jpg, your way is better though :s Thank you for the help, wont be having this problem again in future : )