domingo, 19 de mayo de 2024

Como hacer un cambio de arma en Godot 4.2 3D; script en GDScript y video tutorial;

 extends Area3D

var Esferauno = preload("res://ESCENAS/PLAYER NUEVO BORRABLE.tscn")


# Called when the node enters the scene tree for the first time.

func _ready():

pass # Replace with function body.



# Called every frame. 'delta' is the elapsed time since the previous frame.

func _process(delta):

pass



func _on_area_entered(area):


var parent = get_parent()


var CollisionShape3Dcubo = parent.get_node("CollisionShape3D")





get_node("CollisionShape3D").queue_free()


pass # Replace with function body.



func _on_area_exited(area):


var Esferauno = Esferauno.instantiate()


add_child(Esferauno)


$"../Player".queue_free()

pass # Replace with function body.



EXPLICACION: video comentado con mi voz.


No hay comentarios:

Publicar un comentario