Attack animation and collision troubles

wesstclaire

  • Posts: 8
I've been dealing with an issue where I have a multi frame attack happening (sword swing) and I've set a collision box to the area of the attack animation as a sensor so that the swing of the sword flows through the opposing actor. The problem is that the collision box appears right away and last the entire duration of the animation and what I'd like to know is how to set the collision to only occur at the right moment?

corbanwolf

  • Posts: 161
You have if current frame count is for example 5. Then code happens only at this frame. You can out that condition in collision event

wesstclaire

  • Posts: 8
I'm not following you...can you be more specific

JeffreyDriver

  • *
  • Posts: 2151
You can create and destroy collision shapes as needed. So it's just a case of creating the correct logic. Also, if you used sensor shapes you can check the current frame number.
Current Projects:
The Grand Grimoire Chronicles Episode 1 now on Kongregate!.
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk