The Daily Click ::. Forums ::. Klik Coding Help ::. PLZ O PLZ O Please! Help me out!
 

Post Reply  Post Oekaki 
 

Posted By Message

Jim Joe Johnson



Registered
  28/03/2004
Points
  45
13th April, 2004 at 17:10:38 -

Okay. I'm making this real cool 2D side-scroller. It's gonna be my first full game, but I'm using my own original graphics, everything. Now, theres no AI in the game, so the baddies walk around with Path Movement and you have to avoid them, right? Well today, I opened the file and began to add more to the game, and guess what? Somehow, now the baddies CANT hurt you wen your not moving. When the main character's "STOPPED" animation is playing, hes invincible to attack. Ive been working on this game for a long time and I need some help. Any suggestions.

 
"Nasty, tricksy Hobbitts!"

Chamzel



Registered
  02/07/2002
Points
  352
13th April, 2004 at 17:15:33 -

You're most likely going to track down the problem and answer inside your events that have to do with the player getting hit and taking damage. Can you list what events you're using the execute the player getting hit and taking damage?



 
CRUSH!!

Jim Joe Johnson



Registered
  28/03/2004
Points
  45
13th April, 2004 at 17:26:45 -

My events are technically the same. An example:

EVENT EXAMPLE ONE: Player collides with enemy AND Player's PUNCH animation is playing: enemy-destroy
REASON FOR EVENT: that event makes it so that when the player punches the enemy the enemy dies.

EVENT EXAMPLE TWO: Player collides with enemy AND Player's STOPPED animation is playing: player-destroy
REASON FOR EVENT: that event makes it so that when the player collides with the enemy and he is stopped, he dies.


Does that help? and if so, could someone tell me what to do?

 
"Nasty, tricksy Hobbitts!"

Jim Joe Johnson



Registered
  28/03/2004
Points
  45
13th April, 2004 at 17:30:01 -

I FIXED IT! And, at the same time, found a shorthand way to do it!

EXAMPLE: player collides with enemy AND player's PUNCH animation is playing: player-destroy.

Then I NEGATE the event part reading layer's PUNCH animation is playing.

It works perfectly! thanks for the tip. I did figure it out by myself


 
"Nasty, tricksy Hobbitts!"

:JULI@N:



Registered
  14/07/2002
Points
  641
13th April, 2004 at 17:48:09 -

may i also add, the condition "Animation stopped is playing" just works while the animation is, well, playing. So, if that animation isn't set to loop (in the animation editor), then the game thinks it's already over and the event doesn't happen

Image Edited by the Author.

 
n/a

Chamzel



Registered
  02/07/2002
Points
  352
13th April, 2004 at 18:25:12 -

It was checking the user animation in the event of the player getting hit? Well, unless the whole player character is a weapon when it attacks, then I wouldn't do that. Instead, when the player attacks create an invisible blip for the moment of the attack around the attacking area and then have that blip destroyed when the attack moment is over. This would create a much more realistic likeness of a player attacking enemy, and it would solve any future problems of "If player animation is not attack and monster and player collide..."

 
CRUSH!!
   

Post Reply



 



Advertisement

Worth A Click