come here

This commit is contained in:
pennyrigate 2023-12-25 02:17:08 -05:00
parent fe9f682818
commit e03cede4bb
6 changed files with 139 additions and 4 deletions

Binary file not shown.

View file

@ -0,0 +1,15 @@
[remap]
importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/msx_come_here.ogg-10fac8d8cfd4cbcf7be954fa7cb4bb10.oggstr"
[deps]
source_file="res://audio/sounds/msx_come_here.ogg"
dest_files=[ "res://.import/msx_come_here.ogg-10fac8d8cfd4cbcf7be954fa7cb4bb10.oggstr" ]
[params]
loop=false
loop_offset=0

Binary file not shown.

View file

@ -0,0 +1,15 @@
[remap]
importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/msx_help_me_get_outta_here.ogg-270d862b9b5346afeb970c07d6c8a47b.oggstr"
[deps]
source_file="res://audio/sounds/msx_help_me_get_outta_here.ogg"
dest_files=[ "res://.import/msx_help_me_get_outta_here.ogg-270d862b9b5346afeb970c07d6c8a47b.oggstr" ]
[params]
loop=false
loop_offset=0

View file

@ -4,6 +4,7 @@ var velocity = Vector2.ZERO
var is_moving = false var is_moving = false
var is_holding_shard = true var is_holding_shard = true
var has_respawned = false var has_respawned = false
var first_lead = true
onready var death_particles = $DeathSplatter onready var death_particles = $DeathSplatter
onready var sprite = $Sprite onready var sprite = $Sprite
onready var anims = $AnimationPlayer onready var anims = $AnimationPlayer
@ -16,6 +17,8 @@ const shard = preload("res://objects/collectibles/shard.tscn")
const BloodSpray := preload("res://objects/environment/blood/blood_spray.tscn") const BloodSpray := preload("res://objects/environment/blood/blood_spray.tscn")
#DIALOGUE #DIALOGUE
const here_take_this = preload("res://audio/sounds/msx_here_take_this.wav") const here_take_this = preload("res://audio/sounds/msx_here_take_this.wav")
const come_here = preload("res://audio/sounds/msx_come_here.ogg")
const help_me = preload("res://audio/sounds/msx_help_me_get_outta_here.ogg")
func _ready(): func _ready():
raycast.add_exception($Hitbox) raycast.add_exception($Hitbox)
@ -31,12 +34,14 @@ func _physics_process(delta):
if respawn_raycast.is_colliding(): if respawn_raycast.is_colliding():
#start moving again after respawning when seeing sg #start moving again after respawning when seeing sg
if raycast.get_collider() != null: if raycast.get_collider() != null:
if first_lead == true: Audio.play_sound(help_me,Audio.ac_voice)
first_lead = false
if raycast.get_collider().is_in_group("player_hitbox"): is_moving = true if raycast.get_collider().is_in_group("player_hitbox"): is_moving = true
velocity.y += 128 * delta velocity.y += 128 * delta
velocity = move_and_slide_with_snap(velocity, Vector2.DOWN, Vector2.UP, true) velocity = move_and_slide_with_snap(velocity, Vector2.DOWN, Vector2.UP, true)
#Anims #Anims
if velocity.x == 0: if velocity.x == 0:
if !anims.get_current_animation() == "give" && !anims.get_current_animation() == "respawn" && !anims.get_current_animation() == "blink": anims.play("idle") if !anims.get_current_animation() == "give" && !anims.get_current_animation() == "respawn" && !anims.get_current_animation() == "blink" && !anims.get_current_animation() == "come here": anims.play("idle")
else: else:
anims.play("walk") anims.play("walk")
#Stop at the end of path and give shard #Stop at the end of path and give shard
@ -55,8 +60,8 @@ func spawn_shard():
is_holding_shard = false is_holding_shard = false
func switch_action(): func switch_action():
#is_moving = true Audio.play_sound(come_here,Audio.ac_voice)
pass anims.play("come here")
func spray_blood(): func spray_blood():
for i in 16: for i in 16:

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=22 format=2] [gd_scene load_steps=23 format=2]
[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=1] [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_respawn.png" type="Texture" id=2]
@ -62,6 +62,18 @@ tracks/3/keys = {
"update": 1, "update": 1,
"values": [ false ] "values": [ false ]
} }
tracks/4/type = "value"
tracks/4/path = NodePath("ComeHere:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[sub_resource type="Animation" id=18] [sub_resource type="Animation" id=18]
resource_name = "blink" resource_name = "blink"
@ -104,6 +116,59 @@ tracks/2/keys = {
"values": [ 0, 1, 2, 3, 0 ] "values": [ 0, 1, 2, 3, 0 ]
} }
[sub_resource type="Animation" id=19]
resource_name = "come here"
length = 4.0
step = 0.06
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ ExtResource( 11 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Sprite:hframes")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 1 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("Sprite:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 0 ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("ComeHere:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0.06, 2.52 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ true, false ]
}
[sub_resource type="Animation" id=15] [sub_resource type="Animation" id=15]
resource_name = "give" resource_name = "give"
length = 4.0 length = 4.0
@ -211,6 +276,18 @@ tracks/2/keys = {
"update": 1, "update": 1,
"values": [ 0 ] "values": [ 0 ]
} }
tracks/3/type = "value"
tracks/3/path = NodePath("ComeHere:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0.06 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[sub_resource type="Animation" id=17] [sub_resource type="Animation" id=17]
resource_name = "respawn" resource_name = "respawn"
@ -293,6 +370,18 @@ tracks/2/keys = {
"update": 1, "update": 1,
"values": [ 0, 1, 2, 3 ] "values": [ 0, 1, 2, 3 ]
} }
tracks/3/type = "value"
tracks/3/path = NodePath("ComeHere:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0.1 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[sub_resource type="ShaderMaterial" id=10] [sub_resource type="ShaderMaterial" id=10]
resource_local_to_scene = true resource_local_to_scene = true
@ -317,6 +406,7 @@ script = ExtResource( 13 )
autoplay = "idle" autoplay = "idle"
anims/RESET = SubResource( 16 ) anims/RESET = SubResource( 16 )
anims/blink = SubResource( 18 ) anims/blink = SubResource( 18 )
"anims/come here" = SubResource( 19 )
anims/give = SubResource( 15 ) anims/give = SubResource( 15 )
anims/idle = SubResource( 4 ) anims/idle = SubResource( 4 )
anims/respawn = SubResource( 17 ) anims/respawn = SubResource( 17 )
@ -399,4 +489,14 @@ theme = ExtResource( 5 )
text = "Here, take this" text = "Here, take this"
align = 1 align = 1
[node name="ComeHere" type="Label" parent="."]
visible = false
material = ExtResource( 6 )
margin_left = -47.0
margin_top = -22.0
margin_right = 58.0
margin_bottom = -8.0
theme = ExtResource( 5 )
text = "Hey, come here!"
[connection signal="timeout" from="BlinkTimer" to="." method="_on_BlinkTimer_timeout"] [connection signal="timeout" from="BlinkTimer" to="." method="_on_BlinkTimer_timeout"]