Announcement

Collapse
No announcement yet.

Damage Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Damage Help

    Hello, I am starting to work with damage. I have a TPP Mesh that i am using as a "bot" i have made Current Health and Max health for this bot. When i shoot my projectile at him its supposed to do 50 damage out of the 100 he has. But for some reason it skips that and just goes over to destroy actor. Can anyone tell me what i'm doing wrong.

    Projectile

    Click image for larger version

Name:	Projectile.png
Views:	1
Size:	250.7 KB
ID:	1143810

    Bot

    Click image for larger version

Name:	bot.png
Views:	1
Size:	140.9 KB
ID:	1143811

    #2
    Hello,
    I would say that your hit event happens more than once. (To be sure add a print on start, if you see more than one hello, that's it.) If yes a "doonce" with a "delay" to reset "doonce" at the end would be ok. Or replace event hit by event overlap.

    Comment


      #3
      Hello,

      im not sure about this but i think you just have to switch the "subtracting" node. The way i read it the math goes like this: Damage (50) - Current Health (100) = -50 .Then its clamped to the min value and "Bot current health"is 0. Then the Branch becomes true and your actor will be destroyed.

      Regards

      Comment


        #4
        Originally posted by Fen View Post
        Hello,
        I would say that your hit event happens more than once. (To be sure add a print on start, if you see more than one hello, that's it.) If yes a "doonce" with a "delay" to reset "doonce" at the end would be ok. Or replace event hit by event overlap.
        I tried that and its still not working. I'm not sure what it could be did i setup the damage right? My currenthealth variable is at 100 and this should only take 50 from that so there should be 50 left.Does everything look ok in the health for the bot.?

        Comment


          #5
          Oh : You apply damage 50 on top blueprint and in event any damage (from output damage) too.

          Comment


            #6
            Hello,

            I think you just have to switch the damage and the bot current health pin so your calculation is 100 - 50 and not 50 -100.

            Regards

            -- Sorry for Doublepost. I didn't see my post has to be confirmed first
            Last edited by Abarudra; 02-06-2015, 05:18 AM.

            Comment


              #7
              Originally posted by Fen View Post
              Oh : You apply damage 50 on top blueprint and in event any damage (from output damage) too.
              I'm sorry i don't understand what you mean.

              Comment


                #8
                Originally posted by Abarudra View Post
                Hello,

                I think you just have to switch the damage and the bot current health pin so your calculation is 100 - 50 and not 50 -100.

                Regards

                -- Sorry for Doublepost. I didn't see my post has to be confirmed first
                That worked thanks! Can't believe i missed that

                Comment


                  #9
                  Originally posted by Firezown View Post
                  That worked thanks! Can't believe i missed that
                  Me too. Welcome Abarudra. What a cool first post ^^

                  Comment


                    #10
                    Thanks. Glad i could help.

                    Comment

                    Working...
                    X