Skip to content

Commit

Permalink
zombie animations and behaviour
Browse files Browse the repository at this point in the history
+ 0.9 hit 0.1 block 0.0 parry
+ 50 health 40 instability

+ looped zombie idles, walk anims

+ uses root motion for zombie walk

+ simpler beehave tree
+ attack straight away after chasing
+ SkipWait beehave node to skip
over a wait block
+ put wait beehave nodes/scenes in folder

! health not entire barmax when not 100

! previously freed error when dying and
respawning. set enable false before freeing?

! enable/disable root motion when needed.
for example, when attacking, dont use.

! need to reword attack components
to make it more modular

! need more modular way to modify
trim/speed values in anim tree
  • Loading branch information
Snaiel committed Jun 17, 2024
1 parent cc860c1 commit f602211
Show file tree
Hide file tree
Showing 13 changed files with 5,648 additions and 238 deletions.
5,399 changes: 5,399 additions & 0 deletions animations/zombie_animations_1/zombie_animations_1.blend.import

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scenes/beehave/wait/ResetWait.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://t8wg0g461fli"]

[ext_resource type="Script" path="res://scripts/beehave/reset_wait.gd" id="1_2yujl"]
[ext_resource type="Script" path="res://scripts/beehave/wait/reset_wait.gd" id="1_2yujl"]

[node name="ResetWait" type="Node"]
script = ExtResource("1_2yujl")
2 changes: 1 addition & 1 deletion scenes/beehave/wait/Wait.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://bdnrgdpa3fa5c"]

[ext_resource type="Script" path="res://scripts/beehave/wait.gd" id="1_1icoq"]
[ext_resource type="Script" path="res://scripts/beehave/wait/wait.gd" id="1_1icoq"]

[node name="Wait" type="Node"]
script = ExtResource("1_1icoq")
4 changes: 2 additions & 2 deletions scenes/beehave/wait/WaitBlock.tscn
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[gd_scene load_steps=4 format=3 uid="uid://chv25a2oggqaw"]

[ext_resource type="Script" path="res://scripts/beehave/wait_block.gd" id="1_qy36l"]
[ext_resource type="Script" path="res://scripts/beehave/wait/wait_block.gd" id="1_xg5a3"]
[ext_resource type="PackedScene" uid="uid://bdnrgdpa3fa5c" path="res://scenes/beehave/wait/Wait.tscn" id="2_idvk0"]
[ext_resource type="PackedScene" uid="uid://t8wg0g461fli" path="res://scenes/beehave/wait/ResetWait.tscn" id="3_7lsyv"]

[node name="WaitBlock" type="Node" node_paths=PackedStringArray("wait_leaf", "reset_wait")]
script = ExtResource("1_qy36l")
script = ExtResource("1_xg5a3")
wait_leaf = NodePath("Wait")
reset_wait = NodePath("ResetWait")

Expand Down
84 changes: 77 additions & 7 deletions scenes/entities/Enemies/Swordsman.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
[ext_resource type="PackedScene" uid="uid://cw3sck872787g" path="res://scenes/beehave/set_actions/SetGotHitFalse.tscn" id="28_mcqya"]
[ext_resource type="PackedScene" uid="uid://cfuiyhthukrn0" path="res://scenes/beehave/attacks/SingleRandomAttack.tscn" id="33_gbbqm"]
[ext_resource type="Script" path="res://scripts/beehave/execute_expression.gd" id="34_eiv28"]
[ext_resource type="Script" path="res://scripts/beehave/reset_wait.gd" id="38_tf3tw"]
[ext_resource type="Script" path="res://scripts/beehave/wait.gd" id="39_aaww2"]
[ext_resource type="PackedScene" uid="uid://b4vbjom07vuli" path="res://scenes/beehave/set_actions/SetWalkSpeed.tscn" id="40_6x0m4"]
[ext_resource type="PackedScene" uid="uid://rnknofcns6ch" path="res://scenes/beehave/inputs/InputLeft.tscn" id="41_aqpna"]
[ext_resource type="PackedScene" uid="uid://bpmbb56ftoyja" path="res://scenes/beehave/inputs/InputRight.tscn" id="42_5ucrb"]
[ext_resource type="Script" path="res://addons/beehave/nodes/leaves/blackboard_set.gd" id="43_dysgc"]
[ext_resource type="PackedScene" uid="uid://d1wjh32ysekoi" path="res://scenes/beehave/set_actions/SetRunSpeed.tscn" id="44_a2t2c"]
[ext_resource type="PackedScene" uid="uid://ppcsagqgu032" path="res://scenes/beehave/inputs/InputForwards.tscn" id="45_kskia"]
[ext_resource type="Script" path="res://scripts/beehave/wait/reset_wait.gd" id="49_tfh3i"]
[ext_resource type="Script" path="res://scripts/beehave/wait/wait.gd" id="50_mbudd"]

[sub_resource type="Resource" id="Resource_6we7u"]
script = ExtResource("2_8acob")
Expand Down Expand Up @@ -110,23 +110,93 @@ sword = NodePath("CharacterModel/Armature_004/GeneralSkeleton/Sword")
[node name="CharacterModel" parent="." instance=ExtResource("2_0tr8h")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)

[node name="GeneralSkeleton" parent="CharacterModel/Armature_004" index="0"]
bones/1/position = Vector3(6.04682e-06, 0.928626, -9.00516e-08)
bones/1/rotation = Quaternion(-0.0364564, -0.367114, -0.0133018, 0.929366)
bones/2/rotation = Quaternion(0.0504308, 0.0402731, -0.00849581, 0.997879)
bones/3/rotation = Quaternion(0.100698, 0.081046, -0.0184478, 0.991439)
bones/4/rotation = Quaternion(0.100698, 0.081046, -0.0184478, 0.991439)
bones/5/rotation = Quaternion(-0.0375602, -0.011032, 0.00219372, 0.999231)
bones/6/rotation = Quaternion(-0.054458, 0.176927, -0.0130317, 0.98263)
bones/8/rotation = Quaternion(0.524253, 0.460725, 0.542051, -0.468051)
bones/9/rotation = Quaternion(0.0474451, 0.843246, -0.522597, 0.116526)
bones/10/rotation = Quaternion(0.277458, -0.604294, 0.295283, 0.686043)
bones/11/rotation = Quaternion(-0.104369, 0.789564, 0.125817, 0.591494)
bones/12/rotation = Quaternion(0.0444242, 0.077714, -0.045648, 0.994939)
bones/13/rotation = Quaternion(-0.219211, 0.673395, 0.208745, 0.674472)
bones/14/rotation = Quaternion(2.98023e-08, 4.47035e-08, 6.66134e-16, 1)
bones/15/rotation = Quaternion(-1.49012e-08, -1.49012e-08, 2.98023e-08, 1)
bones/16/rotation = Quaternion(0.0326982, -0.00579913, 0.0611036, 0.997579)
bones/17/rotation = Quaternion(0.142788, -0.00077261, -0.00694361, 0.989729)
bones/18/rotation = Quaternion(-1.49012e-08, -1.49012e-08, 1.49012e-08, 1)
bones/19/rotation = Quaternion(-2.98023e-08, -5.96046e-08, -2.98023e-08, 1)
bones/20/rotation = Quaternion(0.124657, 0.00606972, -0.0858581, 0.98846)
bones/21/rotation = Quaternion(0.189711, -0.00139368, 0.014238, 0.981736)
bones/22/rotation = Quaternion(-1.49012e-08, -1.49012e-08, 1.49012e-08, 1)
bones/23/rotation = Quaternion(-1.49012e-08, 1.49012e-08, 1.49012e-08, 1)
bones/24/rotation = Quaternion(0.264954, -0.0133327, -0.130873, 0.955245)
bones/25/rotation = Quaternion(0.275544, 0.00175889, 0.0240698, 0.960985)
bones/26/rotation = Quaternion(-1.49012e-08, -1.49012e-08, 1.49012e-08, 1)
bones/27/rotation = Quaternion(-1.49012e-08, -1.49012e-08, 1.49012e-08, 1)
bones/28/rotation = Quaternion(0.290917, -0.014055, -0.163943, 0.942493)
bones/29/rotation = Quaternion(0.336146, 0.0112787, 0.0495706, 0.940437)
bones/30/rotation = Quaternion(-1.49012e-08, -1.49012e-08, 1.49012e-08, 1)
bones/31/rotation = Quaternion(-1.49012e-08, -1.49012e-08, 1.49012e-08, 1)
bones/32/rotation = Quaternion(0.489204, -0.484239, -0.589672, -0.422468)
bones/33/rotation = Quaternion(0.186803, 0.845471, -0.490798, -0.0969608)
bones/34/rotation = Quaternion(0.285857, 0.679323, -0.222608, 0.638162)
bones/35/rotation = Quaternion(0.14699, -0.743609, 0.00398269, 0.652245)
bones/36/rotation = Quaternion(-1.83582e-05, 0.0773394, 0.0429052, 0.996081)
bones/37/rotation = Quaternion(-0.108474, -0.754011, -0.0908499, 0.641442)
bones/39/rotation = Quaternion(5.96046e-08, 8.9407e-08, 2.98023e-08, 1)
bones/40/rotation = Quaternion(0.0395766, 0.00983451, 0.010194, 0.999116)
bones/41/rotation = Quaternion(0.147297, 0.000254452, 0.00977862, 0.989044)
bones/42/rotation = Quaternion(-4.47035e-08, 0, -4.47035e-08, 1)
bones/43/rotation = Quaternion(-4.47035e-08, 0, -4.47035e-08, 1)
bones/44/rotation = Quaternion(0.11099, 0.00862119, 0.0246105, 0.993479)
bones/45/rotation = Quaternion(0.263567, 0.00144613, -0.016844, 0.964493)
bones/46/rotation = Quaternion(-4.47035e-08, 0, -4.47035e-08, 1)
bones/47/rotation = Quaternion(-1.49012e-08, 4.47035e-08, -4.47035e-08, 1)
bones/48/rotation = Quaternion(0.187009, -0.00859906, 0.067387, 0.980006)
bones/49/rotation = Quaternion(0.320425, -0.00242639, -0.0338017, 0.946668)
bones/50/rotation = Quaternion(-4.47035e-08, 0, -4.47035e-08, 1)
bones/51/rotation = Quaternion(-4.47035e-08, 0, -4.47035e-08, 1)
bones/52/rotation = Quaternion(0.207169, -0.0111395, 0.0920781, 0.973899)
bones/53/rotation = Quaternion(0.349285, -0.0122068, -0.0687267, 0.934413)
bones/54/rotation = Quaternion(-4.47035e-08, 0, -4.47035e-08, 1)
bones/55/rotation = Quaternion(-4.47035e-08, 0, -4.47035e-08, 1)
bones/56/rotation = Quaternion(0.0770803, 0.225182, 0.965584, -0.104877)
bones/57/rotation = Quaternion(0.0388392, 0.946694, -0.297267, -0.117877)
bones/58/rotation = Quaternion(-0.0451625, 0.671766, -0.737692, 0.0500203)
bones/59/rotation = Quaternion(0.027883, 0.999373, 0.0204614, -0.00757287)
bones/61/rotation = Quaternion(-0.123633, 0.0317165, 0.983773, 0.126095)
bones/62/rotation = Quaternion(0.0266145, 0.952748, -0.293244, -0.0746392)
bones/63/rotation = Quaternion(0.0989926, 0.556111, -0.817814, -0.110098)
bones/64/rotation = Quaternion(0.00306753, 0.99987, 0.0155852, -0.00295573)

[node name="Alpha_Joints" parent="CharacterModel/Armature_004/GeneralSkeleton" index="0"]
surface_material_override/0 = ExtResource("4_yduye")

[node name="Alpha_Surface" parent="CharacterModel/Armature_004/GeneralSkeleton" index="1"]
surface_material_override/0 = SubResource("ShaderMaterial_i1ddg")

[node name="Sword" parent="CharacterModel/Armature_004/GeneralSkeleton" index="2" node_paths=PackedStringArray("_entity") instance=ExtResource("4_r63io")]
transform = Transform3D(-0.18487, -0.251436, 0.950054, 0.318492, -0.929873, -0.18412, 0.929724, 0.268546, 0.251986, -0.312581, 0.879604, -0.212712)
transform = Transform3D(-0.18487, -0.251436, 0.950054, 0.318492, -0.929873, -0.18412, 0.929724, 0.268546, 0.251986, -0.307378, 0.879604, -0.218087)
_entity = NodePath("../../../..")

[node name="Area" parent="CharacterModel/Armature_004/GeneralSkeleton/Sword" index="1"]
collision_mask = 2

[node name="LockOnAttachment" parent="CharacterModel/Armature_004/GeneralSkeleton" index="3"]
transform = Transform3D(0.942295, -0.12887, -0.308985, -0.0148777, 0.905912, -0.423204, 0.334451, 0.40338, 0.85172, 0.0215049, 1.27707, -0.00864891)

[node name="Crosshair" parent="CharacterModel/Armature_004/GeneralSkeleton/LockOnAttachment/AttachmentPoint" index="0" node_paths=PackedStringArray("backstab_component", "dizzy_component")]
backstab_component = NodePath("../../../../../../Combat/BackstabComponent")
dizzy_component = NodePath("../../../../../../Combat/DizzyComponent")

[node name="HeadAttachment" parent="CharacterModel/Armature_004/GeneralSkeleton" index="4"]
transform = Transform3D(0.997935, -0.0642358, -0.000251025, 0.062292, 0.968677, -0.240386, 0.0156845, 0.239874, 0.970677, -0.0221937, 1.49531, 0.120927)

[node name="AnimationTree" parent="CharacterModel" index="2"]
"parameters/Dizzy Finisher Which One/current_state" = ""
"parameters/Dizzy Finisher Which One/current_index" = -1
Expand Down Expand Up @@ -481,13 +551,13 @@ key = "\"can_set_investigate_last_agent_position\""
value = "true"

[node name="ResetWaitBeforeChase" type="Node" parent="BeehaveTree/SelectorComposite/Aggro/AggroTarget/ActAggro/StayOrChase/SquareUpIfClose"]
script = ExtResource("38_tf3tw")
script = ExtResource("49_tfh3i")
wait_id = 23169934

[node name="InputNone" parent="BeehaveTree/SelectorComposite/Aggro/AggroTarget/ActAggro/StayOrChase/SquareUpIfClose" instance=ExtResource("17_6rhnw")]

[node name="Wait" type="Node" parent="BeehaveTree/SelectorComposite/Aggro/AggroTarget/ActAggro/StayOrChase/SquareUpIfClose"]
script = ExtResource("39_aaww2")
script = ExtResource("50_mbudd")
time = 1.0
wait_id = 61967809

Expand Down Expand Up @@ -528,15 +598,15 @@ key = "\"can_set_investigate_last_agent_position\""
value = "true"

[node name="ResetWait" type="Node" parent="BeehaveTree/SelectorComposite/Aggro/AggroTarget/ActAggro/StayOrChase/Chase"]
script = ExtResource("38_tf3tw")
script = ExtResource("49_tfh3i")
wait_id = 61967809

[node name="InputNone" parent="BeehaveTree/SelectorComposite/Aggro/AggroTarget/ActAggro/StayOrChase/Chase" instance=ExtResource("17_6rhnw")]

[node name="SetRunSpeed" parent="BeehaveTree/SelectorComposite/Aggro/AggroTarget/ActAggro/StayOrChase/Chase" instance=ExtResource("44_a2t2c")]

[node name="WaitBeforeChase" type="Node" parent="BeehaveTree/SelectorComposite/Aggro/AggroTarget/ActAggro/StayOrChase/Chase"]
script = ExtResource("39_aaww2")
script = ExtResource("50_mbudd")
time = 2.0
wait_id = 23169934

Expand Down
Loading

0 comments on commit f602211

Please sign in to comment.