Skip to content

Stealth checkpoints persist between quests #555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wjt opened this issue May 12, 2025 · 1 comment
Open

Stealth checkpoints persist between quests #555

wjt opened this issue May 12, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@wjt
Copy link
Member

wjt commented May 12, 2025

Steps to reproduce:

  • Play the template StoryQuest
  • Now play the LoreQuest up to the stealth level

Expected result:

  • Player starts at the beginning of the stealth level

Actual result:

  • Player starts at the first checkpoint

I believe this is because the checkpoint is stored in the game state as the next spawn point, but this is not cleared when changing to a new scene, and the node path happens to match.

@wjt wjt added the bug Something isn't working label May 12, 2025
@wjt
Copy link
Member Author

wjt commented May 12, 2025

func change_to_packed(scene: PackedScene, spawn_point: NodePath = ^"") -> void:
if get_tree().change_scene_to_packed(scene) == OK:
_set_hash(scene.resource_path)
if spawn_point != ^"":
GameState.current_spawn_point = spawn_point

I think we can simply unconditionally set GameState.current_spawn_point here, even if the supplied path is empty ^""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant