How Do I Create A Timer Lock On An Actor?
FallingBoxStudios
Freelance Graphic DesignerMember Posts: 822
What I mean by a "Timer Lock" is: Your character walks automatically and you have to hold on the screen to stop walking, (Kind of like the Chillingo game "This Could Hurt") and if you push on the screen you can stay still for as long as you want but to a minimum of 3 seconds, so if you press the screen once you can't keep walking again until its been 3 seconds, how do I do this? - Hunter Afia
Comments
Fair enough. I use a similar method for double clicks and there's very little to it, as you know from seeing the template I sent. Aside from building the game for you that's the best I can offer.
Perhaps it's time you breakdown that code and learn it yourself so it's not too complicated? You can't reasonably request that people dumb down their code for you....
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
You've already mentioned in a PM that you've added it in your game and it works, but when you release the touch it starts moving again, and I think as previously mentioned to solve this all you need to do is move your current stop movement behavours from your touch rule and put it in its own rule, which stops moving if the locked attribute is true.
After 3 seconds the locked attribute is automatically set back to false and your actor should continue moving.
http://www.kevincross.co.uk/wp-content/uploads/2013/09/Locked-Actor.zip
Now that you've got the 3 second timer lock working your real question for this post is "how do you stop acceleration in a rule?". For that I don't know, maybe constraining it in position?
Your rule would look like this:
If locked attribute is true
Stop movement
I can't remember what I called the attribute and you would need to find the behavior that stops acceleration, but only when the attribute is true.
This rule would not be nested in a touched or released rule.