Author Topic: GetDamageDealtByType alternative?  (Read 381 times)

Legacy_Calgacus

  • Full Member
  • ***
  • Posts: 195
  • Karma: +0/-0
GetDamageDealtByType alternative?
« on: December 13, 2010, 07:03:15 am »


               I was trying to get this function to work for me but it only works with EffectDamage(), I need somehing like that to work for every  time a  creature gets damaged even with basic melee weapons.
On the onDamaged event I want  a script which will determine the type of damage the creature just took and then do stuff based off that damage type.  Any scripts out there for this type of thing?

Thanks.
               
               

               
            

Legacy__Knightmare_

  • Full Member
  • ***
  • Posts: 191
  • Karma: +0/-0
GetDamageDealtByType alternative?
« Reply #1 on: December 13, 2010, 12:59:03 pm »


               Look up the function in the Lexicon. The example script at the bottom shows how to use the function to get the damage by type as a work-around to it only working with EffectDamage(). I have used it for things like getting DAMAGE_TYPE_FIRE.
               
               

               
            

Legacy_Calgacus

  • Full Member
  • ***
  • Posts: 195
  • Karma: +0/-0
GetDamageDealtByType alternative?
« Reply #2 on: December 16, 2010, 02:21:06 am »


               ok, thanks.  I was hoping maybe someone had a big script made up already  for this type of thing.
               
               

               
            

Legacy_420

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +0/-0
GetDamageDealtByType alternative?
« Reply #3 on: December 16, 2010, 02:53:15 am »


               

Calgacus wrote...

ok, thanks.  I was hoping maybe someone had a big script made up already  for this type of thing.

Check out the The True Troll scripts for an example of how to handle specific types of damage taken.

-420
               
               

               
            

Legacy_Calgacus

  • Full Member
  • ***
  • Posts: 195
  • Karma: +0/-0
GetDamageDealtByType alternative?
« Reply #4 on: December 16, 2010, 03:47:51 am »


               Is there a way tto detect if a creature was hit by an open hand attack?   I was thinking, if a pc is throwing axes and on his last axe hits the monster, then when the script runs to check what weapon is in his hands - it will find nothing, so was the creature hit with an axe or an open hand?