prevent undesired start initial state for scenes

This commit is contained in:
betalars 2025-06-08 18:31:59 +02:00
parent 668e79eaee
commit 4fc9298dc2
5 changed files with 261 additions and 14 deletions

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=20 format=3 uid="uid://c3l8tm8ku50vt"]
[gd_scene load_steps=21 format=3 uid="uid://c3l8tm8ku50vt"]
[ext_resource type="Script" uid="uid://cb1d5cwtgllvq" path="res://base-environments/youth_room/scnees/scene_player.gd" id="1_40hhx"]
[ext_resource type="Texture2D" uid="uid://d0ucjqi8tx6vt" path="res://import/interface-elements/frame.png" id="1_bkq30"]
@ -135,6 +135,18 @@ tracks/5/keys = {
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("%AnimationPlayer/Text:volume_db")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
[sub_resource type="Animation" id="Animation_bgeog"]
resource_name = "de"
@ -375,6 +387,18 @@ tracks/7/keys = {
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/8/type = "value"
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/path = NodePath("%AnimationPlayer/Text:volume_db")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/keys = {
"times": PackedFloat32Array(8.04, 9.95),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, -80.0]
}
[sub_resource type="Animation" id="Animation_x0d5q"]
resource_name = "vanish"
@ -415,11 +439,88 @@ tracks/2/keys = {
"values": [0.349066, 0.698132]
}
[sub_resource type="Animation" id="Animation_51c6s"]
resource_name = "ini"
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("../../..:progress")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [17.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("..:custom_minimum_size")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(900, 900)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".:rotation")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.349066]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("../..:modulate")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("../../..:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("../../..:modulate")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_dc6th"]
_data = {
&"RESET": SubResource("Animation_ytihj"),
&"de": SubResource("Animation_bgeog"),
&"en": SubResource("Animation_7qabw"),
&"ini": SubResource("Animation_51c6s"),
&"vanish": SubResource("Animation_x0d5q")
}
@ -582,6 +683,7 @@ root_node = NodePath("../PanelContainer/StartFrame/Panel")
libraries = {
&"": SubResource("AnimationLibrary_dc6th")
}
autoplay = "ini"
[node name="Text" type="AudioStreamPlayer" parent="AnimationPlayer"]
mix_target = 2

View File

@ -352,18 +352,21 @@ tracks/6/keys = {
"update": 1,
"values": [true]
}
tracks/7/type = "value"
tracks/7/type = "audio"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("%AnimationPlayer/Music:playing")
tracks/7/path = NodePath("%AnimationPlayer/Music")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
"clips": [{
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource("6_7f2et")
}],
"times": PackedFloat32Array(0.0333333)
}
tracks/7/use_blend = true
[sub_resource type="Animation" id="Animation_d2p1i"]
resource_name = "vanish"
@ -484,7 +487,9 @@ bbcode_enabled = true
text = "[p]Moonlight trickled down through clouds and twigs as Dräven tapped through the night. He had been searching for a while and he knew a special someone must be hiding in the thicket. When a familiar smell first led him to a few bronce hairs as fluffy as his tail, he didn't think much of it. [/p][p][font_size=8] [/font_size][/p][p]But then he saw paw-prints, that matched his own where he had not been. Would he finally find someone of his kind? He was sure of it, as the familiar scent has never been stronger than tonight. [/p][p][font_size=8] [/font_size][/p][p]When suddenly: Was that chatter? [/p][p][font_size=8] [/font_size][/p][p]His wings rustled with joy over the familiar voice and Dräven decided to get a better look. [/p][p][font_size=8] [/font_size][/p][p]A few flaps and leaps brought him up a tree, to get a glimpse of his soon to be friend. But all he saw was a fox. [/p][p][font_size=8] [/font_size][/p][p]He didn't even want to bother it anymore. [/p][p][font_size=8] [/font_size][/p][p]It would just scream and laugh at his wings of leafs, just like the trees crackled at his paws, that were no roots. With a small whimper, Dräven spread his wings, and slid away to at least find comfort by seeing his reflection in the nearby lake. It took him a while to notice, how there was a sudden silence when the clouds broke: [/p][p][font_size=8] [/font_size][/p][p]Northern lights danced through the sky to form wings, that met at a sleek body made of stars and clouds. The whole forest held its breath as it stared into eyes of moonlight gazing down. [/p][p][font_size=8] [/font_size][/p][p]Dräven was moved to tears when he gazed back at it. He was sad for the dragon that was of the moon and the stars and the skies. It must feel so lost in the universe. But his tears were of joy: It was the first time Dräven saw another creature of many kinds. [/p][p][font_size=8] [/font_size][/p][p][/p]"
fit_content = true
scroll_active = false
visible_characters = 0
visible_characters_behavior = 1
visible_ratio = 0.0
[node name="StartBottom" type="TextureRect" parent="PanelContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 64)

View File

@ -209,6 +209,18 @@ tracks/5/keys = {
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("%StoryScroll:scroll_vertical")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_bgeog"]
resource_name = "de"
@ -768,7 +780,6 @@ layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 2
mouse_filter = 2
scroll_vertical = 100
horizontal_scroll_mode = 0
vertical_scroll_mode = 3
@ -812,13 +823,14 @@ scale = Vector2(0.6, 0.6)
sprite_frames = SubResource("SpriteFrames_liwtr")
frame = 2
script = SubResource("GDScript_80sa6")
noise_power = 1.5
noise_speed = 0.0792855
noise_power = 5.0
[node name="GPUParticles2D" type="GPUParticles2D" parent="PanelContainer/card/BackgroundSprite"]
amount = 500
amount = 1
texture = ExtResource("6_0qiyf")
lifetime = 2.0
explosiveness = 0.2
lifetime = 5.0
explosiveness = 0.29
randomness = 0.14
local_coords = true
process_material = SubResource("ParticleProcessMaterial_jikd6")

View File

@ -115,6 +115,8 @@ func try_scroll():
scroll_target = forward_target
func play_scene():
scroll_target = 0
# FIXME: find out why this needs to be set to prevent scenes from being fully revealed
all_text_revealed = false
animation_complete = false

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=18 format=3 uid="uid://cj1ccdk0686ke"]
[gd_scene load_steps=19 format=3 uid="uid://cj1ccdk0686ke"]
[ext_resource type="Script" uid="uid://cb1d5cwtgllvq" path="res://base-environments/youth_room/scnees/scene_player.gd" id="1_543ki"]
[ext_resource type="Texture2D" uid="uid://d0ucjqi8tx6vt" path="res://import/interface-elements/frame.png" id="2_ho85h"]
@ -153,7 +153,7 @@ length = 94.0
tracks/0/type = "audio"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("../../../AnimationPlayer/Text")
tracks/0/path = NodePath("%AnimationPlayer/Text:volume_db")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
@ -474,11 +474,136 @@ tracks/2/keys = {
"values": [0.349066, 0.698132]
}
[sub_resource type="Animation" id="Animation_kn83e"]
resource_name = "ini"
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("../../..:progress")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [17.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("..:custom_minimum_size")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(900, 900)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".:rotation")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.349066]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("../..:modulate")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("../../..:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("../../..:modulate")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("../TextureRect/SubViewport/Node3D/YouthSpecialMeshesComicBook1:position")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(-0.045, -0.111, 0.033)]
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("../TextureRect/SubViewport/Node3D/YouthSpecialMeshesComicBook1:rotation")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0.0855211, -1.65632, 0.0855211)]
}
tracks/8/type = "value"
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/path = NodePath("../TextureRect/SubViewport/Node3D/YouthSpecialMeshesComicBook2:position")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0.02, -0.055, -0.02)]
}
tracks/9/type = "value"
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/path = NodePath("../TextureRect/SubViewport/Node3D/YouthSpecialMeshesComicBook2:rotation")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(-0.0872665, -2.08043, 0.171042)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_dc6th"]
_data = {
&"RESET": SubResource("Animation_ytihj"),
&"de": SubResource("Animation_bgeog"),
&"en": SubResource("Animation_7qabw"),
&"ini": SubResource("Animation_kn83e"),
&"vanish": SubResource("Animation_x0d5q")
}
@ -639,6 +764,7 @@ root_node = NodePath("../PanelContainer/StartFrame/Panel")
libraries = {
&"": SubResource("AnimationLibrary_dc6th")
}
autoplay = "ini"
[node name="Text" type="AudioStreamPlayer" parent="AnimationPlayer"]
mix_target = 2