Jump to content

Can you level lock a door?


TheStrictNein

Recommended Posts

I'm in the early stages of a mod idea, but due to the nature of the reward, I want it so that only a high level will be able to access it. Can you attach a script to an activator that checks the players level and only unlocks a door if they're level 20+ or so?
Link to comment
Share on other sites

This can be used with an Activator:

begin OnActivate

	if IsActionRef player
		if player.GetLevel >= 20
			DoorREF.Unlock
		else
			ShowMessage InsufficientLevelMsg
		endif
	endif

end

Alternatively, you can attach the above script to the door itself (you don't even have to lock it), making sure it will only open if the player meets the level requirement. In this case, replace DoorREF.Unlock with Activate.

 

(Note: InsufficientLevelMsg is just a placeholder here, it doesn't exist in the GECK. You need to create it)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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