Jump to content

Detect if a container contains stolen items


Recommended Posts

I found a loop on OBSE http://obse.silverlock.org/obse_command_doc.html after searching stolen.
Do you want to do a boolean true/false test or do something with each item?

To shorten that down a bit...

scn FnMoveStolenItems

ref iter
ref actor
ref container

begin function { actor, container }
  foreach iter <- actor
    if iter.GetOwner != actor
      if iter.isEquipped
        iter.unequipMe
      endif
      iter.RemoveMeIR containerTo
    endif
  endif
end
Link to comment
Share on other sites

Sorry to confuse things there - I should have realised the logic of (iter.GetOwner != 0) was needed - up to you whether you want to apply this only to PlayerRef or create generic function for all actors.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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