Help, maybe its an Angle Problem, but there should be a lot of solutes

MagoNicolasMagoNicolas Member, PRO Posts: 2,090
edited November -1 in Working with GS (Mac)
I need some help, hope someone or Darren could help me, its for Fall Fu Template, but it is not a specific "problem" of that template, many people might have done something like this for a lot of games.

I need to make an Enemy, that you can kill (Fall over him, Like fall Fu Template) Only if you fall OVER him, and not by the side.

So, if you fall by the side and hit the enemy, you would die.

I Already have the Enemy Kill if you fall over him, but its just a collide rule.

Anyone have a good solution?

Cheers

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    It seems like you could keep the overlap/collide condition but also add another condition. For example you might add any one of the following conditions:

    1) check to see if the self.Position.Y is above enemy.Position.Y
    or
    2) check to see if the distance between self.Position.X and enemy.Position.X is less than 15 pixels
    or
    3) check to see if vectorToAngle between self and enemy is greater than 45 and and less than 135
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    Already Solved! I use something similar to 1)

    Thanks!
Sign In or Register to comment.