Jump to content

how to use "GetWornItem()" on NPC?


Recommended Posts

How do you use GetWornItem() on an NPC? is it even possible?

 

This compiles for the player, so i thought that with a small edit it would work for an NPC too, sadly it doesn't ->

Event OnActivate(objectreference akfurniture)
  Actor Player = Game.GetPlayer()
    Form Equipment = Player.GetWornItem(3).Item
      Player.equipItem(Equipment)

"OnActivate()" can use "(objectreference akfurniture)" or "(objectreference akActionRef)"

So i tried using akActionRef to reference the NPC.

These examples won't compile, i've tried variations of both but none of them will compile either ->

Event OnActivate(objectreference akActionRef)
  Actor NPC = akActionRef
    Form Equipment = NPC.GetWornItem(3).Item
      NPC.equipItem(Equipment)
EndEvent
Event Onactivate(objectreference akActionRef)
    Form Equipment = akActionRef.GetWornItem(3).Item
      akActionRef.equipItem(Equipment)
EndEvent

Any ideas?

Edited by SandMouseAnarchy
Link to comment
Share on other sites

  • Recently Browsing   0 members

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