From 3ef7ffd0315128fb995467adaaee6d454692e502 Mon Sep 17 00:00:00 2001 From: Ententerminator Date: Sat, 1 Feb 2020 12:45:12 +0100 Subject: [PATCH 1/6] hoffentlich bald pizza --- BodyConfig/LoadBodyParts.gd | 13 +++++++++++++ BodyConfig/bodyBuilderMenu.tscn | 32 ++++++-------------------------- BodyParts/BodyBase/BodyBase.tscn | 2 +- Global/BodyPartLoader.gd | 7 +++++++ project.godot | 3 +-- 5 files changed, 28 insertions(+), 29 deletions(-) create mode 100644 BodyConfig/LoadBodyParts.gd create mode 100644 Global/BodyPartLoader.gd diff --git a/BodyConfig/LoadBodyParts.gd b/BodyConfig/LoadBodyParts.gd new file mode 100644 index 0000000..f84967f --- /dev/null +++ b/BodyConfig/LoadBodyParts.gd @@ -0,0 +1,13 @@ +extends VBoxContainer + + +# Called when the node enters the scene tree for the first time. +func _ready(): + for entry in BodyPartLoader.bodyparts: + var button = Button.new() + button.text = entry.key + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/BodyConfig/bodyBuilderMenu.tscn b/BodyConfig/bodyBuilderMenu.tscn index 38939cd..bb409dc 100644 --- a/BodyConfig/bodyBuilderMenu.tscn +++ b/BodyConfig/bodyBuilderMenu.tscn @@ -1,8 +1,8 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] -[ext_resource path="res://BodyParts/Tesso.tscn" type="PackedScene" id=1] +[ext_resource path="res://BodyParts/BodyBase/BodyBase.tscn" type="PackedScene" id=1] [ext_resource path="res://BodyConfig/bodyBuildingScript.gd" type="Script" id=2] - +[ext_resource path="res://BodyConfig/LoadBodyParts.gd" type="Script" id=3] [node name="Body Builder Menu" type="Spatial"] script = ExtResource( 2 ) @@ -30,29 +30,7 @@ __meta__ = { margin_right = 300.0 margin_bottom = 600.0 rect_min_size = Vector2( 300, 500 ) - -[node name="Button" type="Button" parent="GUI/HBoxC/VBoxC"] -margin_right = 300.0 -margin_bottom = 20.0 -text = "Button 1" - -[node name="Button2" type="Button" parent="GUI/HBoxC/VBoxC"] -margin_top = 24.0 -margin_right = 300.0 -margin_bottom = 44.0 -text = "Button 2" - -[node name="Button3" type="Button" parent="GUI/HBoxC/VBoxC"] -margin_top = 48.0 -margin_right = 300.0 -margin_bottom = 68.0 -text = "Button 3" - -[node name="Button4" type="Button" parent="GUI/HBoxC/VBoxC"] -margin_top = 72.0 -margin_right = 300.0 -margin_bottom = 92.0 -text = "Button 4" +script = ExtResource( 3 ) [node name="ViewportContainer" type="ViewportContainer" parent="GUI/HBoxC"] margin_left = 304.0 @@ -73,5 +51,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 3 ) [node name="MouseLook" type="RayCast" parent="GUI/HBoxC/ViewportContainer/Viewport"] enabled = true +collide_with_areas = true +collide_with_bodies = false [node name="Torso" parent="." instance=ExtResource( 1 )] diff --git a/BodyParts/BodyBase/BodyBase.tscn b/BodyParts/BodyBase/BodyBase.tscn index 130277f..d7e8c79 100644 --- a/BodyParts/BodyBase/BodyBase.tscn +++ b/BodyParts/BodyBase/BodyBase.tscn @@ -2,7 +2,6 @@ [ext_resource path="res://BodyParts/BodyBase/BodyBase.gd" type="Script" id=1] - [sub_resource type="CapsuleMesh" id=1] [sub_resource type="CapsuleShape" id=2] @@ -21,6 +20,7 @@ mesh = SubResource( 1 ) material/0 = null [node name="TorsoCollider" type="CollisionShape" parent="."] +transform = Transform( 0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0, 0 ) shape = SubResource( 2 ) [node name="FrontLeft" type="Spatial" parent="."] diff --git a/Global/BodyPartLoader.gd b/Global/BodyPartLoader.gd new file mode 100644 index 0000000..9e968b2 --- /dev/null +++ b/Global/BodyPartLoader.gd @@ -0,0 +1,7 @@ +extends Node + +var bodyparts : Dictionary + +# Called when the node enters the scene tree for the first time. +func _ready(): + bodyparts["Arm"] = load("res://BodyParts/Arm.tscn") diff --git a/project.godot b/project.godot index 4b61df9..b3782d6 100644 --- a/project.godot +++ b/project.godot @@ -33,12 +33,11 @@ _global_script_class_icons={ [application] config/name="BodyPartFighter" -run/main_scene="res://Ingame/Testing.tscn" config/icon="res://icon.png" [autoload] -InGameState="*res://Global/InGameState.gd" +BodyPartLoader="*res://Global/BodyPartLoader.gd" [rendering] From 153d5455501b11380945ef44be34bddcaa8ffc71 Mon Sep 17 00:00:00 2001 From: karl Date: Sat, 1 Feb 2020 12:46:35 +0100 Subject: [PATCH 2/6] Fix collision shape offset of body part --- BodyParts/Arm.gd | 2 +- BodyParts/Arm.tscn | 8 +++++--- BodyParts/BodyBase/BodyBase.tscn | 7 +++---- BodyParts/BodyPart.gd | 5 +++-- BodyParts/PushingBodyPart.gd | 7 ++++++- Ingame/Testing.tscn | 4 +++- 6 files changed, 21 insertions(+), 12 deletions(-) diff --git a/BodyParts/Arm.gd b/BodyParts/Arm.gd index f3f6ffe..192eda1 100644 --- a/BodyParts/Arm.gd +++ b/BodyParts/Arm.gd @@ -15,7 +15,7 @@ func action(): func push(body): # TODO: Hardcoded values - maybe try to generalize - base.apply_impulse(transform.basis.xform(Vector3(0.0, 0.0, -3.0)), base.transform.basis.y * 10.0) + base.apply_impulse(transform.basis.xform(Vector3(-3.0, 0.0, 0.0)), base.transform.basis.y * 10.0) # Called every frame. 'delta' is the elapsed time since the previous frame. #func _process(delta: float) -> void: diff --git a/BodyParts/Arm.tscn b/BodyParts/Arm.tscn index eda4bfe..a72ea91 100644 --- a/BodyParts/Arm.tscn +++ b/BodyParts/Arm.tscn @@ -4,7 +4,6 @@ [ext_resource path="res://3D Input/untitled.glb" type="PackedScene" id=2] [ext_resource path="res://BodyParts/Arm.gd" type="Script" id=3] - [sub_resource type="SphereShape" id=1] [sub_resource type="SphereShape" id=2] @@ -19,15 +18,18 @@ shape = SubResource( 1 ) [node name="Mesh" parent="." index="1" instance=ExtResource( 2 )] +[node name="Sphere" parent="Mesh" index="0"] +visible = false + [node name="BoneAttachment" type="BoneAttachment" parent="Mesh/Armature/Skeleton" index="1"] -transform = Transform( 1, -1.98292e-23, -3.18966e-24, 6.71348e-24, -9.49949e-08, 1, -2.07636e-23, -1, -9.49949e-08, -2.23781e-16, -0.0078205, -5.05441 ) +transform = Transform( 1, -1.98247e-23, -2.98292e-24, 6.50669e-24, -9.49949e-08, 1, -2.07684e-23, -1, -9.49949e-08, -2.23781e-16, -0.0078205, -5.05441 ) bone_name = "bone_2" [node name="RemoteTransform" type="RemoteTransform" parent="Mesh/Armature/Skeleton/BoneAttachment" index="0"] remote_path = NodePath("../../../../../TouchArea") [node name="TouchArea" parent="." index="2"] -transform = Transform( 1, -1.98292e-23, -3.18966e-24, 6.71348e-24, -9.49949e-08, 1, -2.07636e-23, -1, -9.49949e-08, -2.23781e-16, -0.0078205, -7.60024 ) +transform = Transform( 1, -1.98247e-23, -2.98292e-24, 6.50669e-24, -9.49949e-08, 1, -2.07684e-23, -1, -9.49949e-08, -2.23781e-16, -0.0078205, -7.60024 ) [node name="CollisionShape" type="CollisionShape" parent="TouchArea" index="0"] transform = Transform( 1, 2.98291e-24, -1.98247e-23, -2.07684e-23, -9.49949e-08, -1, -6.50669e-24, 1, -9.49949e-08, 2.23781e-16, 0.399765, 0.00782054 ) diff --git a/BodyParts/BodyBase/BodyBase.tscn b/BodyParts/BodyBase/BodyBase.tscn index 130277f..8c4318e 100644 --- a/BodyParts/BodyBase/BodyBase.tscn +++ b/BodyParts/BodyBase/BodyBase.tscn @@ -2,7 +2,6 @@ [ext_resource path="res://BodyParts/BodyBase/BodyBase.gd" type="Script" id=1] - [sub_resource type="CapsuleMesh" id=1] [sub_resource type="CapsuleShape" id=2] @@ -24,7 +23,7 @@ material/0 = null shape = SubResource( 2 ) [node name="FrontLeft" type="Spatial" parent="."] -transform = Transform( 1.62921e-07, -5.30863e-14, -1, -3.25841e-07, -1, 0, -1, 3.25841e-07, -1.62921e-07, 0.6, 0, 1 ) +transform = Transform( 0.5, -1.62921e-07, -0.866025, -3.25841e-07, -1, 0, -0.866025, 2.82187e-07, -0.5, 0.6, 0, 1 ) [node name="FrontLeftAttachMent" type="MeshInstance" parent="FrontLeft"] transform = Transform( 0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0, 0 ) @@ -38,10 +37,10 @@ transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0 ) shape = SubResource( 4 ) [node name="FrontRight" type="Spatial" parent="."] -transform = Transform( 1.62921e-07, -5.30863e-14, 1, -3.25841e-07, -1, 0, 1, -3.25841e-07, -1.62921e-07, -0.6, 0, 1 ) +transform = Transform( 0.5, -1.62921e-07, 0.866025, -3.25841e-07, -1, 0, 0.866025, -2.82187e-07, -0.5, -0.6, 0, 1 ) [node name="FrontRightAttachMent" type="MeshInstance" parent="FrontRight"] -transform = Transform( 0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0, 0 ) +transform = Transform( 0.3, 0, 0, 0, 0.3, 0, 0, 5.0822e-21, 0.3, 0, 0, 0 ) mesh = SubResource( 3 ) material/0 = null diff --git a/BodyParts/BodyPart.gd b/BodyParts/BodyPart.gd index e3b6e2f..62385c9 100644 --- a/BodyParts/BodyPart.gd +++ b/BodyParts/BodyPart.gd @@ -22,12 +22,13 @@ func _ready() -> void: func _process(delta: float) -> void: # We do this here because we want the whole tree to really be done instancing if not setup_done: - var translation = physics_shape.global_transform.basis * physics_shape.translation + var translation = physics_shape.global_transform.origin + print(translation) remove_child(physics_shape) base.add_child(physics_shape) - physics_shape.translation = translation + physics_shape.global_transform.origin = translation setup_done = true diff --git a/BodyParts/PushingBodyPart.gd b/BodyParts/PushingBodyPart.gd index 5b445ef..1ddf25e 100644 --- a/BodyParts/PushingBodyPart.gd +++ b/BodyParts/PushingBodyPart.gd @@ -3,6 +3,8 @@ class_name PushingBodyPart onready var touch_area = get_node("TouchArea") +export(float) var damage = 10.0 + # Called when the node enters the scene tree for the first time. func _ready() -> void: @@ -11,7 +13,10 @@ func _ready() -> void: func _on_touch_area_entered(body): if body.name != base.name: - push(body) + if body.is_in_group("Terrain"): + push(body) + elif body.is_in_group("Player"): + InGameState.subtract_player_health(body.id, damage) func push(body): diff --git a/Ingame/Testing.tscn b/Ingame/Testing.tscn index 6d46412..552dc89 100644 --- a/Ingame/Testing.tscn +++ b/Ingame/Testing.tscn @@ -19,7 +19,9 @@ transform = Transform( 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0 ) mesh = SubResource( 1 ) material/0 = null -[node name="StaticBody" type="StaticBody" parent="MeshInstance"] +[node name="StaticBody" type="StaticBody" parent="MeshInstance" groups=[ +"Terrain", +]] [node name="CollisionShape" type="CollisionShape" parent="MeshInstance/StaticBody"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 ) From 42cdfce1a1a8a62f89bd00b6988622ab8bbc4ffa Mon Sep 17 00:00:00 2001 From: Leon Palluch Date: Sat, 1 Feb 2020 12:49:08 +0100 Subject: [PATCH 3/6] fixed mouse release in body builder menu --- 3D Input/Stierbg.jpg.import | 34 ++++++++++++++++++++++++++++++++ 3D Input/horselegimg.jpg.import | 34 ++++++++++++++++++++++++++++++++ BodyConfig/LoadBodyParts.gd | 5 +++-- BodyConfig/bodyBuildingScript.gd | 18 ++++++++--------- 4 files changed, 79 insertions(+), 12 deletions(-) create mode 100644 3D Input/Stierbg.jpg.import create mode 100644 3D Input/horselegimg.jpg.import diff --git a/3D Input/Stierbg.jpg.import b/3D Input/Stierbg.jpg.import new file mode 100644 index 0000000..32194f2 --- /dev/null +++ b/3D Input/Stierbg.jpg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Stierbg.jpg-b439c056e778b8fb16ae62aa15547147.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://3D Input/Stierbg.jpg" +dest_files=[ "res://.import/Stierbg.jpg-b439c056e778b8fb16ae62aa15547147.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/3D Input/horselegimg.jpg.import b/3D Input/horselegimg.jpg.import new file mode 100644 index 0000000..a0556e9 --- /dev/null +++ b/3D Input/horselegimg.jpg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/horselegimg.jpg-8935d9a9effef767d66fb9866f38d2c4.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://3D Input/horselegimg.jpg" +dest_files=[ "res://.import/horselegimg.jpg-8935d9a9effef767d66fb9866f38d2c4.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/BodyConfig/LoadBodyParts.gd b/BodyConfig/LoadBodyParts.gd index f84967f..125aab2 100644 --- a/BodyConfig/LoadBodyParts.gd +++ b/BodyConfig/LoadBodyParts.gd @@ -4,8 +4,9 @@ extends VBoxContainer # Called when the node enters the scene tree for the first time. func _ready(): for entry in BodyPartLoader.bodyparts: - var button = Button.new() - button.text = entry.key + #var button = Button.new() + #button.text = entry.key + pass # Called every frame. 'delta' is the elapsed time since the previous frame. diff --git a/BodyConfig/bodyBuildingScript.gd b/BodyConfig/bodyBuildingScript.gd index e0139a8..3060f0f 100644 --- a/BodyConfig/bodyBuildingScript.gd +++ b/BodyConfig/bodyBuildingScript.gd @@ -70,13 +70,11 @@ func _physics_process(delta): func _input(event): - if _viewport.get_viewport().get_mouse_position().x >= 0: - if event is InputEventMouseButton: - if event.pressed: - print("Mouse Click at: ", event.position) - _prev_mouse_pos = event.position - _viewRot = true - else: - print("mouse unpressed at: ", event.position) - _viewRot = false - + if event is InputEventMouseButton: + if event.pressed and _viewport.get_viewport().get_mouse_position().x >= 0: + print("Mouse Click at: ", event.position) + _prev_mouse_pos = event.position + _viewRot = true + else: + print("mouse unpressed at: ", event.position) + _viewRot = false From ee733726e37b40709359fcc924d4bcde95b300cd Mon Sep 17 00:00:00 2001 From: karl Date: Sat, 1 Feb 2020 12:49:20 +0100 Subject: [PATCH 4/6] Fix impulse vector when hitting ground --- BodyParts/Arm.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BodyParts/Arm.gd b/BodyParts/Arm.gd index 192eda1..9b7ed44 100644 --- a/BodyParts/Arm.gd +++ b/BodyParts/Arm.gd @@ -14,8 +14,8 @@ func action(): func push(body): - # TODO: Hardcoded values - maybe try to generalize - base.apply_impulse(transform.basis.xform(Vector3(-3.0, 0.0, 0.0)), base.transform.basis.y * 10.0) + # We multiply by 0.1 because we only want it to spin slightly, it should mostly go up + base.apply_impulse(transform.basis.xform(touch_area.global_transform.origin) * 0.1, base.transform.basis.y * 5.0) # Called every frame. 'delta' is the elapsed time since the previous frame. #func _process(delta: float) -> void: From e8c7cb3e33b6925868765ff930fc861241fc257f Mon Sep 17 00:00:00 2001 From: karl Date: Sat, 1 Feb 2020 13:00:25 +0100 Subject: [PATCH 5/6] Players can fight each other (but bose lose health) --- BodyParts/Arm.tscn | 8 +++++--- BodyParts/BodyBase/BodyBase.gd | 6 +++--- BodyParts/BodyBase/BodyBase.tscn | 5 +++-- BodyParts/BodyPart.gd | 4 ++-- BodyParts/PushingBodyPart.gd | 2 +- Ingame/Testing.tscn | 12 ++++++++++++ project.godot | 2 ++ 7 files changed, 28 insertions(+), 11 deletions(-) diff --git a/BodyParts/Arm.tscn b/BodyParts/Arm.tscn index a72ea91..200c275 100644 --- a/BodyParts/Arm.tscn +++ b/BodyParts/Arm.tscn @@ -4,7 +4,9 @@ [ext_resource path="res://3D Input/untitled.glb" type="PackedScene" id=2] [ext_resource path="res://BodyParts/Arm.gd" type="Script" id=3] -[sub_resource type="SphereShape" id=1] +[sub_resource type="CapsuleShape" id=3] +radius = 0.724339 +height = 5.27855 [sub_resource type="SphereShape" id=2] radius = 0.591769 @@ -13,8 +15,8 @@ radius = 0.591769 script = ExtResource( 3 ) [node name="PartCollider" parent="." index="0"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -8 ) -shape = SubResource( 1 ) +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -5.34203 ) +shape = SubResource( 3 ) [node name="Mesh" parent="." index="1" instance=ExtResource( 2 )] diff --git a/BodyParts/BodyBase/BodyBase.gd b/BodyParts/BodyBase/BodyBase.gd index 99d95e9..f48b502 100644 --- a/BodyParts/BodyBase/BodyBase.gd +++ b/BodyParts/BodyBase/BodyBase.gd @@ -1,9 +1,9 @@ extends Spatial class_name BodyBase -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" + +export(int) var player_id + # Called when the node enters the scene tree for the first time. func _ready(): diff --git a/BodyParts/BodyBase/BodyBase.tscn b/BodyParts/BodyBase/BodyBase.tscn index ee8024b..e52a13e 100644 --- a/BodyParts/BodyBase/BodyBase.tscn +++ b/BodyParts/BodyBase/BodyBase.tscn @@ -12,7 +12,9 @@ [sub_resource type="SphereShape" id=5] -[node name="Torso" type="RigidBody"] +[node name="Torso" type="RigidBody" groups=[ +"Player", +]] script = ExtResource( 1 ) [node name="TorsoMesh" type="MeshInstance" parent="."] @@ -20,7 +22,6 @@ mesh = SubResource( 1 ) material/0 = null [node name="TorsoCollider" type="CollisionShape" parent="."] -transform = Transform( 0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0, 0 ) shape = SubResource( 2 ) [node name="FrontLeft" type="Spatial" parent="."] diff --git a/BodyParts/BodyPart.gd b/BodyParts/BodyPart.gd index 62385c9..18f6034 100644 --- a/BodyParts/BodyPart.gd +++ b/BodyParts/BodyPart.gd @@ -22,13 +22,13 @@ func _ready() -> void: func _process(delta: float) -> void: # We do this here because we want the whole tree to really be done instancing if not setup_done: - var translation = physics_shape.global_transform.origin + var translation = physics_shape.global_transform print(translation) remove_child(physics_shape) base.add_child(physics_shape) - physics_shape.global_transform.origin = translation + physics_shape.global_transform = translation setup_done = true diff --git a/BodyParts/PushingBodyPart.gd b/BodyParts/PushingBodyPart.gd index 1ddf25e..11e5615 100644 --- a/BodyParts/PushingBodyPart.gd +++ b/BodyParts/PushingBodyPart.gd @@ -16,7 +16,7 @@ func _on_touch_area_entered(body): if body.is_in_group("Terrain"): push(body) elif body.is_in_group("Player"): - InGameState.subtract_player_health(body.id, damage) + InGameState.subtract_player_health(body.player_id, damage) func push(body): diff --git a/Ingame/Testing.tscn b/Ingame/Testing.tscn index 552dc89..6b3c697 100644 --- a/Ingame/Testing.tscn +++ b/Ingame/Testing.tscn @@ -43,6 +43,18 @@ key = 83 [node name="Arm" parent="Torso/FrontRight" index="1" instance=ExtResource( 1 )] key = 65 +[node name="Torso2" parent="." instance=ExtResource( 3 )] +transform = Transform( -0.866025, -0.353553, -0.353553, -6.18172e-08, -0.707107, 0.707107, -0.5, 0.612372, 0.612372, 0, 3.02111, -9 ) +player_id = 1 + +[node name="Arm" parent="Torso2/FrontLeft" index="1" instance=ExtResource( 1 )] +key = 81 + +[node name="Arm" parent="Torso2/FrontRight" index="1" instance=ExtResource( 1 )] +key = 87 + [node name="UI" parent="." instance=ExtResource( 2 )] [editable path="Torso"] + +[editable path="Torso2"] diff --git a/project.godot b/project.godot index b3782d6..0337e80 100644 --- a/project.godot +++ b/project.godot @@ -33,10 +33,12 @@ _global_script_class_icons={ [application] config/name="BodyPartFighter" +run/main_scene="res://Ingame/Testing.tscn" config/icon="res://icon.png" [autoload] +InGameState="*res://Global/InGameState.gd" BodyPartLoader="*res://Global/BodyPartLoader.gd" [rendering] From 113db3e9004c4b562fc633bb9c3da5a20b5ef503 Mon Sep 17 00:00:00 2001 From: karl Date: Sat, 1 Feb 2020 13:05:28 +0100 Subject: [PATCH 6/6] Fix player health being subtracted on both bars --- UI/UI.tscn | 1 + 1 file changed, 1 insertion(+) diff --git a/UI/UI.tscn b/UI/UI.tscn index 1b33837..13854aa 100644 --- a/UI/UI.tscn +++ b/UI/UI.tscn @@ -55,6 +55,7 @@ script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false } +player_id = 1 [node name="HSplitContainer2" type="HSplitContainer" parent="MarginContainer/PlayerHealthController/VSplitContainer"] visible = false