Jump to content


Photo

sprite wanna play only once


  • Please log in to reply
8 replies to this topic

#1 roshan119

roshan119

    GMC Member

  • New Member
  • 11 posts

Posted 10 October 2011 - 06:04 AM

I have creating a fighting game in gamer maker 8 so i va 2 sprite 1 =player 2= enimy get up
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!!!!
  • 0

#2 Mayhem Games

Mayhem Games

    Proud Kiwi

  • GMC Member
  • 956 posts
  • Version:GM:Studio

Posted 10 October 2011 - 06:10 AM

In the animation end event set the sprite back to the standing sprite.
  • 0

#3 roshan119

roshan119

    GMC Member

  • New Member
  • 11 posts

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
  • 0

#4 Mayhem Games

Mayhem Games

    Proud Kiwi

  • GMC Member
  • 956 posts
  • Version:GM:Studio

Posted 10 October 2011 - 06:53 AM

Posted Image
  • 0

#5 roshan119

roshan119

    GMC Member

  • New Member
  • 11 posts

Posted 10 October 2011 - 07:03 AM

thanks it was awsom

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.

  • 0

#6 Nocturne

Nocturne

    Nocturne Games

  • Administrators
  • 17022 posts
  • Version:GM:Studio

Posted 10 October 2011 - 07:16 AM

That depends. The easiest way would be to use the keyboard check PRESSED event rather than the normal event.
  • 0

#7 roshan119

roshan119

    GMC Member

  • New Member
  • 11 posts

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
  • 0

#8 Nocturne

Nocturne

    Nocturne Games

  • Administrators
  • 17022 posts
  • Version:GM:Studio

Posted 10 October 2011 - 07:26 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.
  • 0

#9 roshan119

roshan119

    GMC Member

  • New Member
  • 11 posts

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users