TeleporterTutorial.webm

In this tutorial we will create a script that teleports players to a configurable location. The script detects players entering an area of the island with a Trigger Behavior and uses the TeleportPlayer Method Node to teleport them.

Completed teleporter script

Completed teleporter script

Teleporter script state diagram

Teleporter script state diagram

What you will learn

<aside> đź’ˇ

The script created in this tutorial can be found in game under the scripting examples view.

</aside>

1) Creating the teleporter script

To begin we create a new script and name it “Teleporter”. This gives us a place to start scripting and an object that can be placed in the world.