![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | XxcringekidxX |
I’m trying to make spikes that every time that you touch them they take away some points but right now it just does it really fast and that’s not what I want
Heres my code:
extends Area2D
func _physics_process(delta):
var boide = get_overlapping_bodies()
for body in boide:
if body.name == “Player”:
global.Coins -= global.Take_away
if global.Coins < 0:
get_tree().change_scene(“res://Scenes/Death screen.tscn”)