Hey. If you’ve played Canyon Miners (https://launch.crayta.com/play/c8agbkzz) you’ll have seen a tutorial system I made for players when they first log in to play. I’ve made that into a handy package which you can install now and use in your games in a number of ways.
How to install
- Go to the community tab and search for “Tutorial”
- Install the package
- Add the UserTutorial template to your User template
Now your game is ready to display tutorials and handle the save data that ensures players only see the tutorial the first time they play your game. You can change the saveVersion property on the script folder you just created on the user if you ever want to reset this and force players to view the tutorial again (for example when there is new content to show them).
Triggering the tutorial
In order to trigger the tutorial to show you’ll need to call the “StartTutorial” function on the user entity, for example…
You can check if a player has seen the tutorial via the tutorialRan boolean property on the user in an OnUserLogin function to handle showing tutorials straight away, i.e.
if userEntity:FindScriptProperty("tutorialRan") == false then userEntity:SendToScripts("StartTutorial") end
Configuring tutorial sections
You will need to set up the various tutorial sections by adding the tutorialSpecScript to cameras/entities in the world. This script contains the following properties…
- camera (Entity) = the camera to show to the user
- header (Text) = the header to show on screen
- body (Text) = the body of text to show on screen
- index (Number) = the order in which to display the tutorials
Once set up, the script on the user will automatically find them and handle preventing player movement etc.
You can see an example here : https://launch.crayta.com/play/z5mz7uf5
Let me know if you have any questions/suggestions for improvements!