msx dialogue

This commit is contained in:
pennyrigate 2023-12-25 01:52:03 -05:00
parent afc233c3c2
commit 62885d32cb
7 changed files with 80 additions and 13 deletions

Binary file not shown.

View file

@ -0,0 +1,23 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/msx_here_take_this.wav-44c3d77c989b2c235758f53cf50ab9d1.sample"
[deps]
source_file="res://audio/sounds/msx_here_take_this.wav"
dest_files=[ "res://.import/msx_here_take_this.wav-44c3d77c989b2c235758f53cf50ab9d1.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

View file

@ -12,6 +12,7 @@ onready var ac_shard = $ShardSound
onready var ac_pause_music = $PauseMusic
onready var ac_menu = $MenuSound
onready var ac_land = $LandSound
onready var ac_voice = $Voice
#Sounds
const a_key = preload("res://audio/sounds/key.ogg")
const a_arrow = preload("res://audio/sounds/arrow_collect.ogg")

View file

@ -49,4 +49,7 @@ volume_db = -15.0
[node name="LandSound" type="AudioStreamPlayer" parent="."]
[node name="Voice" type="AudioStreamPlayer" parent="."]
volume_db = -5.0
[connection signal="finished" from="ShardSound" to="." method="_on_ShardSound_finished"]

View file

@ -267,7 +267,7 @@ position = Vector2( 712, 152 )
scale = Vector2( 1, 2 )
[node name="Button" parent="Environment" instance=ExtResource( 18 )]
position = Vector2( 728, 128 )
position = Vector2( 64, 168 )
target_group = "cell"
[node name="Button2" parent="Environment" instance=ExtResource( 18 )]
@ -275,8 +275,7 @@ position = Vector2( 312, 19 )
target_group = "yellow_star_laser"
[node name="MsX" parent="Environment" groups=["cell"] instance=ExtResource( 22 )]
position = Vector2( 740, 158 )
scale = Vector2( -1, 1 )
position = Vector2( 180, 158 )
[node name="Barrier" parent="Environment" instance=ExtResource( 23 )]
position = Vector2( 424, 112 )
@ -518,10 +517,10 @@ song_name = "♫Spine_V2"
[node name="Label" type="Label" parent="."]
material = ExtResource( 31 )
margin_left = 688.0
margin_top = 120.0
margin_right = 849.0
margin_bottom = 143.0
margin_left = 636.0
margin_top = 198.0
margin_right = 797.0
margin_bottom = 221.0
theme = ExtResource( 32 )
text = "Help me get
outta here!"

View file

@ -14,6 +14,8 @@ onready var start_position = position
onready var blink_timer = $BlinkTimer
const shard = preload("res://objects/collectibles/shard.tscn")
const BloodSpray := preload("res://objects/environment/blood/blood_spray.tscn")
#DIALOGUE
const here_take_this = preload("res://audio/sounds/msx_here_take_this.wav")
func _ready():
raycast.add_exception($Hitbox)
@ -45,6 +47,7 @@ func _physics_process(delta):
anims.play("give")
func spawn_shard():
Audio.play_sound(here_take_this,Audio.ac_voice)
var ShardInstance = shard.instance()
ShardInstance.global_position = Vector2(shard_position.global_position.x,shard_position.global_position.y)
ShardInstance.number = 1

View file

@ -1,9 +1,11 @@
[gd_scene load_steps=20 format=2]
[gd_scene load_steps=22 format=2]
[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=1]
[ext_resource path="res://graphics/npc/msx_respawn.png" type="Texture" id=2]
[ext_resource path="res://graphics/npc/msx_walk.png" type="Texture" id=3]
[ext_resource path="res://graphics/npc/msx_blink.png" type="Texture" id=4]
[ext_resource path="res://ui/theme.tres" type="Theme" id=5]
[ext_resource path="res://ui/2ndpuberty_outline.tres" type="Material" id=6]
[ext_resource path="res://graphics/npc/msx_idle.png" type="Texture" id=11]
[ext_resource path="res://scripts/snap_sprite.gd" type="Script" id=12]
[ext_resource path="res://objects/npc/msx.gd" type="Script" id=13]
@ -48,6 +50,18 @@ tracks/2/keys = {
"update": 0,
"values": [ 0 ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("HereTakeThis:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[sub_resource type="Animation" id=18]
resource_name = "blink"
@ -92,7 +106,7 @@ tracks/2/keys = {
[sub_resource type="Animation" id=15]
resource_name = "give"
length = 0.5
length = 4.0
step = 0.06
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:texture")
@ -144,6 +158,18 @@ tracks/3/keys = {
"method": "spawn_shard"
} ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("HereTakeThis:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0, 2.52 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ true, false ]
}
[sub_resource type="Animation" id=4]
resource_name = "idle"
@ -298,6 +324,7 @@ anims/walk = SubResource( 9 )
[node name="Sprite" type="Sprite" parent="."]
material = SubResource( 10 )
scale = Vector2( -1, 1 )
texture = ExtResource( 15 )
hframes = 2
region_rect = Rect2( 0, 0, 20, 20 )
@ -342,23 +369,34 @@ scale_amount_curve = SubResource( 13 )
[node name="RayCast2D" type="RayCast2D" parent="."]
position = Vector2( 0, 1 )
enabled = true
cast_to = Vector2( 32, 0 )
cast_to = Vector2( -32, 0 )
collision_mask = 3
collide_with_areas = true
[node name="RespawnRaycast" type="RayCast2D" parent="."]
position = Vector2( 16, 0 )
position = Vector2( -16, 0 )
enabled = true
cast_to = Vector2( 56, 0 )
cast_to = Vector2( -56, 0 )
collision_mask = 8
collide_with_areas = true
[node name="Position2D" type="Position2D" parent="."]
position = Vector2( 17, 2 )
position = Vector2( -17, 2 )
__meta__ = {
"_gizmo_extents_": 0.0
}
[node name="BlinkTimer" type="Timer" parent="."]
[node name="HereTakeThis" type="Label" parent="."]
visible = false
material = ExtResource( 6 )
margin_left = -48.0
margin_top = -22.0
margin_right = 57.0
margin_bottom = 1.0
theme = ExtResource( 5 )
text = "Here, take this"
align = 1
[connection signal="timeout" from="BlinkTimer" to="." method="_on_BlinkTimer_timeout"]