Jump to content

GetDamageTypes


Jojash

Recommended Posts

Would anyone be able to explain to me how InstanceData, Owners and DamageTypeInfo works? My best understanding currently is that I want to fill an owner with an instance of a weapon (for the purposes of use with GetDamageTypes). The best way to do this (I think) is to use GetInstanceOwner(35) with whatever actor I'm using (or possibly to use GetWornItem?) - I'm trying to use this within an onHit block, so I've been using "akAggressor" as my actor. Theoretically, I'll fill the Owner with whatever is in the aggressor's right hand. Now I'm pretty sure it doesn't work that way since when trying to do that I cannot compile.

 

Anyway, here are my problem lines,

InstanceData:Owner thisInstance = new InstanceData:Owner
thisInstance.Owner = (akAggressor as actor).GetInstanceOwner(35)
DamageTypeInfo[] DamageTypes = GetDamageTypes(thisInstance)
fDamage = DamageTypes[0].damage as float

 

 

 

Thanks in advance! :smile:

Edited by Jojash
Link to comment
Share on other sites

Thank you very much for that article, it was extremely helpful! I've managed to fill up the owner struct correctly now (I think my inital hypothesis was actually returning a glove, rather than a weapon, switched to using aksource as the owner instead of the actor). Additionally I'm using GetAttackDamage, rather than GetDamageTypes, since the types aren't relevant for my purpose and everything seems to be working now! :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...