Tewam spawner

This commit is contained in:
Rendo 2025-11-27 11:02:42 +05:00
commit 2bfbfa5089
8 changed files with 126 additions and 67 deletions

View file

@ -18,7 +18,7 @@ const MAX_HP = 100
get:
return hp
@onready var TEMP_start_pos = global_position
var TEMP_start_pos
func _enter_tree() -> void:
set_multiplayer_authority(str(name).to_int())
@ -32,3 +32,8 @@ func _physics_process(_delta: float) -> void:
func die() -> void:
global_position = TEMP_start_pos
hp = MAX_HP
@rpc("any_peer","call_local","reliable")
func set_start_position(start_position: Vector3):
global_position = start_position
TEMP_start_pos = global_position