viernes, 8 de diciembre de 2023

Borrar por script en godot3d version4.2;




Estos ejercicios de scrpt me han dado resultado y e conseguido que un cubo partiendo de base de un nodo Area3d al colisionar con otro se borre del juego al ejecutarse.......



------------------------------------------------------------------------------------------


extends Area3D



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

func _ready():

pass # Replace with function body.




func _on_area_entered(area):

queue_free()

pass # Replace with function body.








---------------------------------------------------------------------------------------------------












extends Area3D


# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.



func _on_area_entered(area):
queue_free()
pass # Replace with function body.
func _process(delta):

scale.y*=1.55

pass






-----------------------------------------------------------------------------------------------


extends Area3D


# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.



func _on_area_entered(area):
queue_free()
pass # Replace with function body.
func _process(delta):

#scale.y*=1.55
translate(Vector3(0,0.02,0))
pass




---------------------------------------------------------------------------------------------------------------



extends Area3D


# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.



func _on_area_entered(area):
queue_free()
pass # Replace with function body.
func _process(delta):

#scale.y*=1.55
translate(Vector3(0,0.001,0))
pass










No hay comentarios:

Publicar un comentario