Jump to content

Recommended Posts

Posted

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.

Posted

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
Posted (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 container

MyContainerPersistenReference.Activate Player; activate the container to show what's inside.

endif

endif

end

 

Thanks for your reply; think I got it figured out now!

Edited by Alehazar
  • Recently Browsing   0 members

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