My friendship levels arent adding

Godot Version

4.6

Question

Hello!! Im making a game where I need to add friendship levels, and i ran into a problem where the function is being called, but it isnt actually adding anything. Any solutions? :smiley:

This script is in a global variable script so that the dialogue manager and all scenes can access it, “added” is being printed but “amy_1” isnt.

var friendship_amy: int = 0

func ready():
	f_a_a.connect(add_amy)

func add_amy():
	friendship_amy +1
	print("added")

func _process(delta: float) -> void:
	if friendship_amy == 1:
		print("amy_1")

You have to store the result back to the variable.

friendship_amy += 1

or

friendship_amy = friendship_amy + 1

thank you!!!