Author Topic: OnDamaged event for PCs?  (Read 317 times)

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
OnDamaged event for PCs?
« on: August 09, 2011, 12:03:01 am »


                Hi,

I'm currently writing a custom devastating critical routine using Terra's nwnx_events for windows and I would need to retrieve the damage dealt to players during PvP fights in order to apply a damage bonus based on the initial damage dealt(instead of applying a death effect). Of course, if the target is a NPC or monster, the OnDamaged event handler is there, but what about PCs? Anyone knows of an alternative?

Thank you!

Kato
               
               

               


                     Modifié par Kato_Yang, 08 août 2011 - 11:08 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
OnDamaged event for PCs?
« Reply #1 on: August 09, 2011, 02:01:02 am »


               Yes, onhit cast spell: unique power or custom spell will fire script before OnDamaged happens to PC and all damage functions are working there.

It however dont work on skin, it must be added to armor.
               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
OnDamaged event for PCs?
« Reply #2 on: August 09, 2011, 02:33:35 am »


               Thanks a lot Shadow!!
               
               

               


                     Modifié par Kato_Yang, 09 août 2011 - 01:37 .
                     
                  


            

Legacy_Alex Warren

  • Sr. Member
  • ****
  • Posts: 326
  • Karma: +0/-0
OnDamaged event for PCs?
« Reply #3 on: August 09, 2011, 08:18:58 am »


               

It however dont work on skin, it must be added to armor.

It does work on skin, but only if your character doesn't wear armor '<img'>
               
               

               


                     Modifié par Alex Warren, 09 août 2011 - 07:19 .
                     
                  


            

Legacy_Xardex

  • Sr. Member
  • ****
  • Posts: 414
  • Karma: +0/-0
OnDamaged event for PCs?
« Reply #4 on: August 09, 2011, 10:17:42 am »


               You just blew my systems right out the window. Of course I had to test it all with no armor on!
Weeeell, should be simple enough to fix...
               
               

               


                     Modifié par Xardex, 09 août 2011 - 09:18 .
                     
                  


            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
OnDamaged event for PCs?
« Reply #5 on: August 09, 2011, 06:51:52 pm »


               Thank you for that precision, Alex.
               
               

               


                     Modifié par Kato_Yang, 09 août 2011 - 05:51 .