Ship mostly works #10
@ -1,11 +1,7 @@
|
||||
class_name ShipHelm
|
||||
extends Interactable
|
||||
|
||||
var parent_ship: Ship
|
||||
|
||||
func _ready():
|
||||
parent_ship = get_parent().get_parent() #sets the parent ship to the ship that the helm is placed on
|
||||
|
||||
@export var parent_ship: Ship
|
||||
|
||||
func interact():
|
||||
if player_reference.is_network_authority:
|
||||
@ -17,4 +13,4 @@ func interact():
|
||||
player_reference.set_is_piloting(false)
|
||||
parent_ship.remove_piloting_player()
|
||||
parent_ship._sync_piloting_state()
|
||||
|
||||
|
||||
|
@ -102,4 +102,4 @@ func set_piloting_player(player: Player):
|
||||
func remove_piloting_player():
|
||||
piloting_player = null
|
||||
ship_is_piloted = false
|
||||
print("The ship is no longer piloted.")
|
||||
print("The ship is no longer piloted.")
|
||||
|
@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://y0xb2vktsr1k"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://y0xb2vktsr1k"]
|
||||
|
||||
[ext_resource type="Script" path="res://assets/core/ships/ship_script.gd" id="1_ghft7"]
|
||||
[ext_resource type="Texture2D" uid="uid://gymb0tju4y67" path="res://addons/kennysprototypetextures/Dark/texture_black (1).png" id="2_3koq8"]
|
||||
[ext_resource type="PackedScene" uid="uid://dm31ddavxv5gt" path="res://assets/core/interactables/ship-helm/ship-helm.tscn" id="3_eyiku"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_6gbwt"]
|
||||
size = Vector3(5, 0.15, 20)
|
||||
@ -50,3 +51,7 @@ shape = SubResource("BoxShape3D_7o08p")
|
||||
|
||||
[node name="HelmLocationMarker" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0)
|
||||
|
||||
[node name="ShipHelm" parent="." node_paths=PackedStringArray("parent_ship") instance=ExtResource("3_eyiku")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -7.54699)
|
||||
parent_ship = NodePath("..")
|
||||
|
Loading…
Reference in New Issue
Block a user