Jump to content

hasKeyword() on weapon with object mod fails


Zzyxzz

Recommended Posts

Hello, i got a small problem....

 

When i check in an onHit Event, on a hunting rifle that has been converted to .50 with: haskeyword(dn_HasReceiver_Converted50) it fails.

I checked it ingame with the console/wornhaskeyword and it returns 1/true

 

Seems like, keywords added by object mods, are not detected by haskeyword. Is there a workaround?

 

 

Thanks,

Zzyxzz

Link to comment
Share on other sites

Have you tried using wornhaskeyword() instead?

 

This works.

 

Checking the weapon directly will return false, BUT you have to check the actor directly!

 

Bad:

(akaggressor as actor).getequippedweapon(0).haskeyword(KeywordAddedByObjectMod)

 

Better:

(akaggressor as actor).wornhaskeyword(KeywordAddedByObjectMod)

 

 

As reference for others.

 

Thanks

Link to comment
Share on other sites

  • 2 years later...
  • Recently Browsing   0 members

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