sprite wanna play only once
#1
Posted 10 October 2011 - 06:04 AM
play have 1 animation = player,spritekick
enimi has a sprite =enimy,enimy fall
this is my question
when i pres "a"=player wanna kik (i have created)
after when players leg touches the enimys body enimy want to fall
i gave create that but when player kicks ennimy is not falling only one time, enimy is continusly falling
i want to make it onli one time
pleas help me developers!!!!
#2
Posted 10 October 2011 - 06:10 AM
#3
Posted 10 October 2011 - 06:26 AM
In the animation end event set the sprite back to the standing sprite.
ware i find animation end pleas tell
#4
Posted 10 October 2011 - 06:53 AM
#5
Posted 10 October 2011 - 07:03 AM
In the animation end event set the sprite back to the standing sprite.
*********
hello friend it was worked thank yoou very much
i have another help
when i press "a"player wants to kik only one time how to do that pleas helpme
MODERATOR EDIT : Please don't double post. You can add more information into your previous post by using the <EDIT> button.
Edited by Nocturne, 10 October 2011 - 07:15 AM.
#6
Posted 10 October 2011 - 07:16 AM
#7
Posted 10 October 2011 - 07:19 AM
That depends. The easiest way would be to use the keyboard check PRESSED event rather than the normal event.
I cant get u becas i am new to this but good in programing
#8
Posted 10 October 2011 - 07:26 AM
- Keyboard
- Key Press
- Key Release
When you use the first one, the keyboard is polled every step, so any code you have in that event is run continuously while the key is pressed. The second will only run the code once when the key is pressed and no more, while the third will only run the code once and no more when the choosen key is released. So, in this way you can make a code run ONCE only when the A key is pressed by using the Key Press event.
#9
Posted 10 October 2011 - 07:31 AM
Well, when you add an event you have the choice of three keyboard events :
- Keyboard
- Key Press
- Key Release
When you use the first one, the keyboard is polled every step, so any code you have in that event is run continuously while the key is pressed. The second will only run the code once when the key is pressed and no more, while the third will only run the code once and no more when the choosen key is released. So, in this way you can make a code run ONCE only when the A key is pressed by using the Key Press event.
ahhh that one i have done but it like this
iwant when i pres A the sprite is kiking and whrn i relese A sprite is stop kicking
but i want when i presing A without relesing sptite animation want to execute only one time after then no animations untiol i relese the A
pleas help me this is my finel ptoject
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











