Alehazar Posted January 9, 2016 Share Posted January 9, 2016 I created a container with a special armor inside, that is only interesting -for roleplaying purposes- for a player that has an allegiance to the Legion. The Container has been placed within the gameworld and has a Persistent Reference. - The script I'm looking for must check: that it is the Player Character that is trying to open the container AND they must have Idolized status with Caesar's Legion.- If this not the case, I want a Message Box to pop up advising the Player that only someone who has total devotion to Caesar can claim what is inside.- If the Conditions are NOT met, the container stays locked.- If the Conditions ARE met, then the container needs to unlock and the Player must be able to take the contents. Any help or reference is appreciated. Link to comment Share on other sites More sharing options...
TommInfinite Posted January 9, 2016 Share Posted January 9, 2016 Try "OnActivate" block. I never tried it with containers though. Basicly it should override what happens after you activate it Begin OnActivate PlayerRef if playerRef.hasreputation ; look for the function somehwere. Unlock Activate PlayerRef ;;;;;;;;;;;;;;;;;;;;; yes, in script terms container activates player and not otherwise =) else ; player doesn't have reputation showmessage MyMessage endif end Link to comment Share on other sites More sharing options...
Alehazar Posted January 9, 2016 Author Share Posted January 9, 2016 (edited) SCN MyScriptnameScript Begin OnActivate if GetReputationPct RepNVCaesarsLegion 1 < 1; if my reputation with Caesar's Legion has NOT been maxed out.showmessage MyMessage; my own message that my reputation with Caesar's Legion NEEDS to be maxed out before the container can be opened.elseif GetReputationPct RepNVCaesarsLegion 1 == 1; if my reputation with Caesar's Legion IS maxed out.MyContainerPersistentReference.unlock; unlock the containerMyContainerPersistenReference.Activate Player; activate the container to show what's inside.endifendifend Thanks for your reply; think I got it figured out now! Edited January 9, 2016 by Alehazar Link to comment Share on other sites More sharing options...
Recommended Posts