Hello everyone, there’s this one issue that is driving me mad:
I created a simple time mechanic with a “time on” script with a boolean that turns to false when you talk with NPCs (while their textbox is active).
I also made a Path 3D and a Path 3D follow for an NPC so that a speed variable turns to 0 when time is deactivated (and textboxes are active), in order to make them stop when you talk to them and also make them start again from the last position when you close the textbox.
Thing is, this actually worked until today, I tried installing the 3D smoothing add-on to help with the jitter and now boom: it doesn’t work anymore.
this is the code I wrote on the Path3DFollow Node:
func _process(delta):
if time.time_on == true:
progress += runspd * delta
else:
runspd = 0
if time.hours == 9 and time.time_on == true:
runspd = 3
state = "normal"
at first I didn’t need to repeat “if time_on == true” so many times, but since it stopped working I tried everything but it still doesn’t stop while he’s following his path, no matter how many times I try stopping him by calling the textbox.
I see in the debugger that the runspd variable doesn’t turn to 0 when it’s supposed to, but time_on is working as intended.
I can’t understand what happened, any suggestion?