Announcement

Collapse
No announcement yet.

Can the "TakeDamage" event be overloaded?

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

    Can the "TakeDamage" event be overloaded?

    Hi everybody, I'm working on a mutator that will give all weapons headshot capability. I have a few questions so here goes:
    1) Can the "TakeDamage" event be overloaded?
    2) How do I determine what type of weapon the player was hit by?
    3) How do I determine if a headshot multiplier has already been applied if I overload the event?
    4) When I create this mutator, what classes do I extend?
    5) Related to 4), do I need to create a new gametype, such as in the Vampire mutator?
    6) How can I get the mutator to automatically list all weapons currently available in the game? This is so that users can customize the headshot damage for each weapon.

    Question 3) is kinda tricky I think because I want this mutator to be flexible enough to handle ANY weapon in UT, current or future.

    I'd appreciate any help you guys could give. Thanks!

    - Tiberius

    #2
    You perhaps want to override NetDamage.
    Weapon is of no importance it's DamageClass type that matters (here is defined if given damageclass does headhsots or not if I remember well). NetDamage gives you info about DamageClass as well.

    So when override NetDamage you would need to check if given damage isn't 'HeadShot' type and in case 'head' was shooted apply extra damage and play <HeadShot> announcement. (play announcement only if victim has been killed I think)

    Comment


      #3
      Alright, I'll check into that. But, um, where is the NetDamage function located. I wasn't able to find it in Actor.uc.

      Thanks

      Comment


        #4
        You need to extend GameRules and there modify NetDamage(),
        and in your mutator simply add your new GameRules.

        Comment


          #5
          Cool, thanks a lot guys! This shouldn't be too hard to do, at least for an alpha version.

          Comment

          Working...
          X