Advanced Question (multiple hit points)

conrad74conrad74 Member Posts: 50
edited November -1 in Working with GS (Mac)
I have an enemy with 4 hit points. There will be a different animation depending on what hit point Player1 comes into contact with. Problem is, sometimes the Player1 hits 2 of the hit points at the exact same time causing both animations to be played. I even tried assigning attributes to each one and when 1 hit point is touched, asking the other 3 to be turned off. Not really working. Anyone know of a solution so when 2 hit points are hit at the same time, only one animation is played? Thanks!

Comments

  • VoidedSkyVoidedSky Member Posts: 1,095
    Have an attribute called self.animation, and another attribute called self.playAnimation.

    Then when the hit point is hit, change self.animation to 1(whatever number for the specific animation)
    and then change attribute self.playAnimation to true

    Another ruleset:

    When self.playAnimation is true:

    when self.animation = 1 :
    play animation XXX

    when self.animation = 2
    play animation XY

    Hope i helped!
    ~CTM

    EDIT: Haha @tshirt, looks like we were posting at the same time!
  • conrad74conrad74 Member Posts: 50
    Hey Guys, thanks for your help. I think I figured it out.
Sign In or Register to comment.