zdswulyx Posted August 16, 2016 Share Posted August 16, 2016 (edited) It's possible to detect via script if a container has stolen items inside? I tried IsOffLimits, but it always returns 0 on the items inside the container. Edited August 16, 2016 by zdswulyx Link to comment Share on other sites More sharing options...
glowplug Posted August 16, 2016 Share Posted August 16, 2016 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 More sharing options...
zdswulyx Posted August 16, 2016 Author Share Posted August 16, 2016 So it's enough to do if iter.GetOwner && iter.GetOwner != playerRef ; this item was stolen else ; this item was not stolen endIf ? If that's the case, it's easier than I thought. Thanks! Link to comment Share on other sites More sharing options...
zdswulyx Posted August 16, 2016 Author Share Posted August 16, 2016 I guess the pseudocode of IsOffLimits confused me a bit. Link to comment Share on other sites More sharing options...
glowplug Posted August 16, 2016 Share Posted August 16, 2016 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 More sharing options...
Recommended Posts