this post was submitted on 17 Sep 2023
13 points (93.3% liked)
Godot
5888 readers
54 users here now
Welcome to the programming.dev Godot community!
This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.
Make sure to follow the Godot CoC while chatting
We have a matrix room that can be used for chatting with other members of the community here
Links
Other Communities
- !inat@programming.dev
- !play_my_game@programming.dev
- !destroy_my_game@programming.dev
- !voxel_dev@programming.dev
- !roguelikedev@programming.dev
- !game_design@programming.dev
- !gamedev@programming.dev
Rules
- Posts need to be in english
- Posts with explicit content must be tagged with nsfw
- We do not condone harassment inside the community as well as trolling or equivalent behaviour
- Do not post illegal materials or post things encouraging actions such as pirating games
We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent
Wormhole
Credits
- The icon is a modified version of the official godot engine logo (changing the colors to a gradient and black background)
- The banner is from Godot Design
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
When switching to get_tree().change_scene_to_file() the same thing accurs. The only errors I'm getting are the ones related to other Nodes trying to interact with the script, which isn't there. Here an example of a button, trying to call a function, as it is connected to it via a signal:
E 0:00:05:0925 emit_signalp: Error calling from signal 'pressed' to callable: 'Node::_on_reload_pressed': Method not found.
There are no other errors when switching the scene like this.For further clarification, here is the scene I'm in:
The script attached to StartMenu does not work, but the script attached to Control does. Again, this only occurs when changing the main scene. I defined this scene as the main scene in the project settings, and the first time it loads (on startup of the game) it works no problem. Just on that second load, the get_tree().change_scene_to_file() maybe somehow messes it up.
Seems like you might have an issue with how you set up the signals. So does
_on_reload_pressed
work before switching scenes, then stops working after switching? Are the signals connected to Control or StartMenu?Also if you send me the project I can take a quick look.
The button is connected to then StartMenu. I'll see how I can send you the project... never used gitlab or similar services before.