diff --git a/levels/Campaign/Level0.tscn b/levels/Campaign/Level0.tscn index 542991e..e5b877d 100644 --- a/levels/Campaign/Level0.tscn +++ b/levels/Campaign/Level0.tscn @@ -16,7 +16,7 @@ autoplay = true [node name="Door" parent="." instance=ExtResource( 3 )] position = Vector2( 180, 128 ) -unlocked = false +next_scene = "res://levels/Campaign/Level 1/Level 1.tscn" [node name="CanvasModulate" type="CanvasModulate" parent="."] color = Color( 0.564706, 0.564706, 0.564706, 1 ) diff --git a/objects/Door.gd b/objects/Door.gd index 0b6f15f..1130a43 100644 --- a/objects/Door.gd +++ b/objects/Door.gd @@ -10,9 +10,9 @@ func _process(delta): if $Area2D.get_overlapping_bodies().size() != 0: if unlocked: $Label.text = "F to Open" - if Input.is_action_pressed("open"): + if Input.is_action_just_pressed("open"): Player.current_scene = next_scene - get_tree().change_scene(next_scene) + get_tree().change_scene(""+next_scene+"") else: $Label.text = "Locked" $Label.visible = true