Compare commits

...

2 commits

Author SHA1 Message Date
Raxki 6ddab73ba5 Fix NSFW defeated blinking animation??? 2024-10-29 12:07:49 -04:00
Raxki 565eab0b75 Fix range marker detection issue
(could fix other issues too?)
2024-10-29 12:07:28 -04:00
4 changed files with 80 additions and 76 deletions

View file

@ -188,6 +188,71 @@ tracks/4/keys = {
"values": [Color(1, 0, 0, 0)]
}
[sub_resource type="Animation" id="Animation_gj0my"]
resource_name = "ai_defeated_end"
length = 5.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("7_ya3jl")]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:hframes")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [2]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:vframes")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Sprite2D:frame")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 4.7),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [0, 1]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Sprite2D:material:shader_parameter/FlashColor")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 0, 0, 0)]
}
[sub_resource type="Animation" id="Animation_d06fy"]
resource_name = "ai_defeated_start"
length = 0.50005
@ -2097,71 +2162,6 @@ tracks/3/keys = {
"values": [16, 17, 18, 19]
}
[sub_resource type="Animation" id="Animation_gj0my"]
resource_name = "ai_defeated_end"
length = 5.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("7_ya3jl")]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:hframes")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [2]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:vframes")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Sprite2D:frame")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 4.7),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [0, 1]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Sprite2D:material:shader_parameter/FlashColor")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 0, 0, 0)]
}
[resource]
_data = {
"RESET": SubResource("Animation_04piu"),

View file

@ -606,16 +606,18 @@ script = ExtResource("7_jc1pg")
[node name="Victory" type="Node" parent="StateMachine/Root"]
script = ExtResource("7_jc1pg")
[node name="BlastSpawnerEast" type="Marker2D" parent="."]
[node name="RangeSpawners" type="Node2D" parent="."]
[node name="East" type="Marker2D" parent="RangeSpawners"]
position = Vector2(19, -14)
[node name="BlastSpawnerWest" type="Marker2D" parent="."]
[node name="West" type="Marker2D" parent="RangeSpawners"]
position = Vector2(-21, -15)
[node name="BlastSpawnerSouth" type="Marker2D" parent="."]
[node name="South" type="Marker2D" parent="RangeSpawners"]
position = Vector2(-2, 15)
[node name="BlastSpawnerNorth" type="Marker2D" parent="."]
[node name="North" type="Marker2D" parent="RangeSpawners"]
position = Vector2(-4, -40)
[connection signal="animation_finished" from="AnimationTree" to="." method="_on_animation_tree_animation_finished"]

View file

@ -61,7 +61,7 @@ func _on_attackbox_area_entered(area: Area2D):
func _on_cutscene_issued_command(command: CutsceneCommand, manager: CutsceneManager):
if command is MoveCharacterCommand:
var target_character = manager.root.get_node(command.target_character)
var target_character = manager.get_node(command.target_character)
if target_character != self:
return
movement_scripted_target = command.target_vector if command.target_type == "Vector" else manager.get_node(command.target_node).global_position

View file

@ -26,12 +26,7 @@ signal range_attack_initiated(by: CharacterBase)
@onready var melee_hitbox = $Meleebox
@onready var melee_hitbox_collider = $Meleebox/DetectionArea
@onready var spawners = {
Vector2(1,0): $BlastSpawnerEast,
Vector2(-1,0): $BlastSpawnerWest,
Vector2(0,1): $BlastSpawnerSouth,
Vector2(0,-1): $BlastSpawnerNorth
}
@onready var spawners: Dictionary
var timer = 0
@ -46,6 +41,13 @@ var wants_to_melee = false
func _ready():
state_machine.set_expression_property("melee_stage", 0)
if has_node("RangeSpawners"):
spawners = {
Vector2(1,0): $RangeSpawners/East,
Vector2(-1,0): $RangeSpawners/West,
Vector2(0,1): $RangeSpawners/South,
Vector2(0,-1): $RangeSpawners/North
}
func set_animation_direction(facing_direction: Vector2):
anim_tree.set("parameters/idle/blend_position", facing_direction)