Jump to content

Removing Items from Actor References


RedxYeti

Recommended Posts

Im trying to remove anything really from an actor reference thats filled with the ActorTypeNPC keyword

 

GetActorReference().RemoveAllItems() and GetActorReference().RemoveItem(x) compile, but do nothing.

 

 

Scriptname RemoveItemsNPCsScript extends ReferenceAlias  



Event OnInit()


GetActorReference().RemoveItem(IronDagger, 100)



endevent

Thats my test script if you really need it.

 

I also have Find Matching Reference, In loaded area, closest ticked,

 

What should I do?

Link to comment
Share on other sites

What should you do? Ensure that you have a properly defined property or properties for the object(s) you wish to remove. A formlist could work for multiple objects. Furthermore, register for a single update and use the OnUpdate event to handle any removing of objects. OnInit can sometimes run too early to be of use for actual script work.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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