Skip to content

Commit d88cae7

Browse files
committed
Add switch_scene resource
This is a basic scene-switching block using a string. If we have time later, we can make further improvements by adding a block for loading a scene and using that as the argument to the switch_scene block to implement PackedScene. https://phabricator.endlessm.com/T35706
1 parent 510b85f commit d88cae7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://dnc2555wnobks"]
2+
3+
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_rnqd5"]
4+
5+
[resource]
6+
script = ExtResource("1_rnqd5")
7+
name = &"switch_scene"
8+
target_node_class = ""
9+
description = "Stop playing the current scene, and switch to a different one. You might use this to switch to a new level."
10+
category = "Communication | Methods"
11+
type = 2
12+
variant_type = 0
13+
display_template = "switch the scene to {file_path: STRING}"
14+
code_template = "get_tree().change_scene_to_file({file_path})
15+
"
16+
defaults = {}
17+
signal_name = ""
18+
scope = ""

0 commit comments

Comments
 (0)