The Daily Click ::. Forums ::. Klik Coding Help ::. Hit Detectors and Animation Problems.
 

Post Reply  Post Oekaki 
 

Posted By Message

SawMill



Registered
  29/08/2004
Points
  15
18th September, 2004 at 04:24:23 -

Hi.

I decided to make my character use hit detectors. However, I have ran into some problems.

1. When the key to attack is pressed, the hit detector comes out before the animation even finishes or sometimes starts!

2. The animation does not finish solid, let's say you press shift, the animation ends as soon as you let go of the shift key.

3. I made the hit detector, visible to see how it works out, and I noticed, sometimes when you press shift, and your characters animation doesn't play (for some reason?) the red box still appears, meaning the program registers it as a sucessful press of the shift button, but the darned animation does not play!
Is there some way to remedy the above problems?


Is there a way I can have it so that when the person presses shift, it follows through with the entire animation and has the hit detector stay for the duration of that animation?

Better yet, maybe I can have the animation ending prematurely, fixed, and maybe there's a way I can have the hit detector show up during a certain FRAME of an animation? so far, I can not find a way.
--------------------------------------------------------------------------
Incase people need to see my events.. My events are as follows...
--------------------------------------------------------------------------
(black box)Animation Normal Attack is playing
Object is NOT moving
Object is facing direction -->
Upon Pressing shift
=
Set position of (red detector box shaped like weapon) at 0,0 from (black box used as the controllable characters detector)


-----------------------------------------------------------------
All of that is ONE event. Now under this event, I put...
-----------------------------------------------------------------
(black box) animation normal attack is over
=
Set position at 10,10 from (Platform Movement Object)
----------------------------------------------------------------

I did the above because the Red Detector is made invisible at start. Therefore, when the player presses shift to attack, the red detector is moved and appears, so that the collision can destroy the enemy, but then afterwards, it returns to position 10,10 of PMO, since the PMO is outside the playing field it makes the detector disappear from playing field, where it can wait for another attack.

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
18th September, 2004 at 05:50:19 -

It's a bit hard for me to tell what the problem is. But I think I was having the same problem as you. Instead of making the the red detector go offscreen, make it invisible and reappear. Also make sure the change animation action is the last one of your actions that plays for the condition.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy
   

Post Reply



 



Advertisement

Worth A Click