I have a global variable called CharacterMove. It is a boolean that defaults to true and, when true, lets the player move.
extends Node
var canSee = false
var canMove = true
At certain points (such as dialogue or in certain areas), I change it to false so that the player cannot move and is roped into obligatory conversation.
func _on_BedroomArea_body_exited(body):
if body.name == "sabelu":
if GameState.chapter == 1 and GameState.step == 1:
CharacterState.canMove = false <------- This says it changes, but nothing happens
var resource = preload("res://dialogue/chapterone.tres") <------ this loads up perfectly fine
Dialogue.show_dialogue("step_1", resource)
GameState.step = 2
else:
pass
else:
pass
In all of my cutscenes, when I set it through the animation player, it works fine. No problems.
In general interaction, it was working great up until today. I would set canMove to false, and player would stop moving.
Today, I open up the program and it is no longer working. I even printed canMove. It even says it is set to false.
if CharacterState.canMove == true:
if Input.is_action_pressed("move_right"):
rotation_degrees.y -= speed_rotation * delta
...etc...
velocity = move_and_slide(velocity, Vector3.UP)
else:
animationState.travel("KiyugaWalk_Idle")
else:
pass
I think it knows I cheated on it with Godot 4 (two massive middle fingers to it btw). And no, I'm not trying to back-port. I duplicated everything and tucked this away in case it didn't work out, so as far as it is concerned, nothing has changed since yesterday.