Skip to content

Commit

Permalink
Merge pull request #298 from endlessm/switching-scene-block
Browse files Browse the repository at this point in the history
Add switch_scene resource
  • Loading branch information
manuq authored Nov 6, 2024
2 parents 93e1ef9 + d88cae7 commit 909ac54
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions addons/block_code/blocks/communication/switch_scene.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://dnc2555wnobks"]

[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_rnqd5"]

[resource]
script = ExtResource("1_rnqd5")
name = &"switch_scene"
target_node_class = ""
description = "Stop playing the current scene, and switch to a different one. You might use this to switch to a new level."
category = "Communication | Methods"
type = 2
variant_type = 0
display_template = "switch the scene to {file_path: STRING}"
code_template = "get_tree().change_scene_to_file({file_path})
"
defaults = {}
signal_name = ""
scope = ""

0 comments on commit 909ac54

Please sign in to comment.