Tutorial: Script Course #5 - Let’s Create Scene Transitions

STEP 2: Use a Portal to Move Between Scenes

  1. Switch to the game_scene tab. Under ObjectRoot, create a new Portal node.
  2. Set the portal’s properties:
  1. Set both the Entry Effect and Exit Effect to BLACK.
  2. Add Layer 2 to the CollisionMask.
    This is because the sample player is on Layer 2. If the mask only includes Layer 1, collision will not occur.
  3. Move the Portal node itself (not just the PortalCollision) to the far right side of the stage.
    The position of the Portal node determines the spawn location in the next scene.
  4. Resize the PortalCollision, making it narrower to avoid accidental triggers.
  5. Now create the destination scene:
  1. Open game_scene2 and delete the player object.
    Otherwise, the player would appear twice.
  2. Move the Portal node to the left edge of the map.
  3. Adjust the position of the PortalCollision.
    If it’s on the right side of the Portal node, move it to the left instead.
  4. Change the Portal properties in game_scene2:
  • Set the input direction to left.
  • Set the Target Scene to game_scene.tscn.
  • You should now be able to select the portal in game_scene.
  1. Return to game_scene.
    Likewise, set the Target Scene to game_scene2.tscn and choose its portal.
  2. Test play the game.
    If everything is configured correctly, you should be able to move freely between the two scenes.

Conclusion

This marks the end of the Script Course tutorial series.
The contents of this tutorial cover only the basics.
With ACTION GAME MAKER’s Visual Scripting, you can create a wide variety of behaviors by combining conditions and actions.

With your imagination, you might even build something we developers never anticipated!
If you come up with something cool, be sure to share it on social media or the official guild.


Want to take other courses?

1. Graphics Course
For those who want to animate their own original characters.

3. Expression Enhancement Course
For those who want to add cool, Godot-style visual effects.