Conversation
Consider that a player is no more than a CharacterBody2D, that is the first node in group "player". An thus may or may not have features like PlayerInteraction, PlayerRepel, or PlayerHook. This fixes the gym_area_test scene, which has a custom built player.
|
The (fantastic) recent changes in input hints broke the res://scenes/game_elements/characters/components/gym_area_test.tscn scene, which has a custom built player using the InputWalkBehavior in a CharacterBody2D. |
|
Play this branch at https://play.threadbare.game/branches/endlessm/fix-gym-scene/. (This launches the game from the start, not directly at the change(s) in this pull request.) |
wjt
left a comment
There was a problem hiding this comment.
Makes sense, I think you could tweak the dynamic lookup though.
I wonder if scenes/quests/story_quests/champ/3_stealth/champ_stealth.tscn still works - it uses a custom character.
| if "player_interaction" in player: | ||
| player_interaction = player.player_interaction as PlayerInteraction | ||
| if player_interaction: | ||
| player_interaction.can_interact_changed.connect(_update_player_state) |
There was a problem hiding this comment.
This (untested) is a little more concise and perhaps a bit clearer:
| if "player_interaction" in player: | |
| player_interaction = player.player_interaction as PlayerInteraction | |
| if player_interaction: | |
| player_interaction.can_interact_changed.connect(_update_player_state) | |
| player_interaction = player.get("player_interaction") as PlayerInteraction | |
| if player_interaction: | |
| player_interaction.can_interact_changed.connect(_update_player_state) |
There was a problem hiding this comment.
Much better, and even works!
|
I was about to slip #2099 in here but better not! |
Oh, let me check before merging. |
|
An open question is how we would adjust the global HUD labels for quests where the character has different abilities. |
I was thinking the same thing! Maybe the |


Consider that a player is no more than a CharacterBody2D, that is the first node in group "player". An thus may or may not have features like PlayerInteraction, PlayerRepel, or PlayerHook.
This fixes the gym_area_test scene, which has a custom built player.