Tap screen to move (screenshot provided)
GamingtilDawn
Member Posts: 104
I am having some issues with my coding. I want the character to animate as if climbing a ladder when the player taps the screen. If they arent tapping the screen then nothing should happen. Here is what I have so far, but it isnt working correctly. When i tap the screen (or click, for testing) the player responds at random times. Sometimes it animates once or might not animate at all.
In the screenshot, the left side shows my game attributes, rule called "User taps screen" is in the tap screen actor (not seen on screen). The other rule " tap screen to animate character" is in the player actor.
Comments
The way you have it set up it looks like you would have to hold the mouse button down in order to fire the animate behavior.
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
Yes, the moment you release the button, the "tapped" attribute is flagged as false. You may want to try setting it to true with mouse down, and set it to false using a timer that triggers the "change attribute tapped to false" once the animation has completed.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Thanks @Summation that is how I have it setup, didn't realize that. @Armelline im not sure how to let it know the animation has ended.
At 10fps, 2 frames will take 0.2s to complete. So put a timer in that says "After 0.2s".
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support