[TREASURE HUNT] Lockpicking

This is a Lockpicking Package supplying endless possibilities
unless you can’t handle a simple lock.

  1. Install the Lockpicking package in your current project.
    image
  2. Place the Player Lockpicking script folder on your Player template.
    image

Recommended: install Notification and Prompts package

Place the Lock Template.
Players can now interact with it to start a timing-based picklocking mini-game.
By using the onSuccess, onFail and onTry events, you can combine it with other scripts - as
example to open a door or chest with AdamO’s animation package.

It also comes with a bunch of properties:

Options:
		-(boolean) needsCrouch:
			Does the character need to be crouching to interact?	 
		-(number) digits:
			How often does the player need to succeed to open the lock?
		-(number) speed:
			How fast will it rotate? 
			( = speed * 360 deg per second)
		-(number) mobileSpeed:
			How fast will it rotate on mobile? 
			( = speed * 360 deg per second)
		-(number) tolerance:
			number in deg, which is the allowed offset? 
			( be generous with the range )
		-(number) mobileTolerance:
			number in deg, which is the allowed offset on mobile?  
			( be even more generous with the range of this )
		-(number) tries:
			How much tries does the player have before he fails?

Sounds:
		-(soundasset) soundHit:
			Plays when the player progresses with picklocking 
			( when successfully hitting the lock symbol )
		-(soundasset) soundMiss:
			Plays when the player misses with picklocking 
			( when not successfully hitting the lock symbol )
		-(soundasset) soundSuccess:
			Plays when the lock is opened 
			( when successfully hitting the lock symbol {{digit}} times)
		-(soundasset) soundFail:
			Plays when the lock is not opened
			( when successfully missing the lock symbol {{tries}} times)
		-(soundasset) soundTry:
			Plays when starting the interaction

Events:
		-(event) onSuccess:
			Fires when the lock is unlocked
			( to open chest, use AdamO's animation package and link this up )
		-(event) onFail:
			Fires when the lock remains locked
			( punish the player properly )
		-(event) onTry:
			Fires when the player interacts with the lock

Prompts & Notifications:
		-(text) textSuccess:
			Notification that is sent when the player succeeds.
			( Notification package required )
		-(text) textFail:
			Notification that is sent when the player fails.
			( Notification package required )
		-(text) textTry:
			Notification that is sent when the player interacts with the lock
			( Notification package required )
		-(text) textInUse:
			Notification that is sent when the lock is being used by someone else already.
			( Notification package required )
		-(text) textCrouch:
			Notification that is sent when the the player is not crouching, but {{p.needsCrouch}} is enabled.
			( Notification package required )
		-(text) textInteract:
			Visible when the prompts package is installed an the player looks on the lock	
			( Prompts package required ) 

Screenshots:

Video:

Explanation:
The idea was to bring a package that can easily be used by every creator.
This is something that is clearly visible by the way i designed it.

Who doesn’t know that feeling of being overwhelmed by the amount of functions, names and words shown in an event property when you try to link up a function?

Shh GIFs | Tenor

My solution for that? DO NOT DESPAIR, i will not annoy you with unnecessary details! :wink:
image

Coders might ask: “Only two functions, this is spaghetti, isn’t it?”
FEAR NOT, it is structured after the highest standards of what a daigoro can bear with:

Properties implemented clean enough to eat on them!:

Code - now with comments!:

The Future of Debugging is NOW:

If you have any questions or feedback, feel free to drop it here or inside the Crayta Discord server!

Known bugs:
-:beetle:
-:bug:

FAQ:

Q:`But does it support touch?`
A: It was designed *especially* with having touch in mind.

Q:`How much does it cost?`
A: It is entirely free - for now

Q:`But can i use this in basic mode?`
A:`I insist on that!`

Q:`Can this also be used for something else than locking chests?`
A:It works for locking *everything*.

Q:`Is this compatible with the simp`  A:YES `leAnimationScript?` 

Q:`What am i waiting for?`
A: Good  question, go grab your package now!

Have fun
8 Likes