Hello, im using the PMO object to make an action platform game. my problem when i make the script upon pressing key X play animation ..... but when i press X i play the first frame of my attack action.
here is my script:
Hello, im using the PMO object to make an action platform game. my problem when i make the script upon pressing key X play animation ..... but when i press X i play the first frame of my attack action.
here is my script:


Event 10 is most likely resetting any attack animation back to 'stopped' - try adding a "Active object player: Animation Attacking is playing" and then negate it so it has the X in front. that should fix it I think.
Facebook - Puddinghat Games Facebook




Chaos's solution would work, However if you plan on having lots of diferent animations, you should NOT check whether its playing the attacking animation. Eventually you'd have giant event lists checking for all the possible animations to "protect" from turning to stopped or jumping or what have you.
Instead. Create an anlerable value in your player character caled "state" or "stuck in move". Whenever you initiate an attack or any other animation that needs to be portected from reverting to stopped, or running or jumping, just set "stuck in move to 1.
Now, go back to your event that makes the player character play the stopped animation and add: IF "stuck in move" is 0.
Lastly, you'll need and event as follows for when every "protected" animation finishes: Animation "attack" has finished= set alterable value"stuck in move" to 0.
This ends up nice and tidy with no giant events testing for every possible animation you want to protect one by one.


Yeah, I was only assuming he was using one attack animation.
I use a different method entirely based on visibilities - but yeah, if there will be more than one attack animation, use Holymonkeys method. That will work![]()
Facebook - Puddinghat Games Facebook
I told Marioman the same thing you did in his other thread (I don't know why he made 2???).
But he said he doesn't understand and wants an example.


I have a example files using PMO on my website for basic and advanced stuff. Should have everything on there. It's all commented and everything.![]()
Facebook - Puddinghat Games Facebook
Actually I realized I do mine totally different.
Here is how I prefer to do it:
If "x" is pressed then do animation "attack"
After animation "attack" is over go back to the stopped animation.
Start of frame go to stopped animation
This way upon every action necessary, the animation will change and automatically go back to the proper one.
And for Marioman's game, I'd probably have the arrow keys and movement so you can only move if the animation "attack" is not playing. That's vital.
. thanks Yankovic that worked great. now i need help with the edge of my platforms.
every time i jump on the corner of one of my platforms my character gets stuck in it
to get what i mean look at what happens when you jump into an edge of my flying platforms:http://www.2shared.com/file/5365481/ff0d75fe/New_Folder__4_.html