12 lines
337 B
GDScript
12 lines
337 B
GDScript
extends RigidBody3D
|
|
|
|
|
|
var contacts: int = 0
|
|
|
|
func _on_body_entered(_body: Node) -> void:
|
|
contacts += 1
|
|
if contacts > 2:
|
|
var grenade = load("res://scenes/projectiles/molikman/molikman_molotov_fire.tscn").instantiate()
|
|
Session.dynamic_objects_parent.add_child(grenade,true)
|
|
grenade.global_position = global_position
|
|
queue_free()
|