Open nuevocharrua opened 5 months ago
This would very much be project specific, as we cannot tell if anything needs to be run before that room is launched, for instance. As such, this is not something we are currently planning.
Why is this request got discarded as "Not Planned" so easily? I agree with nuevocharrua that quite frequently I need to test stuff in different rooms and changing the order is a real headache. Like in Godot the user should be allowed to test the specific room they want.
Set the index of the room to the specified variable when running through the button, such as debug_run_room, so that the user's rm_init can detect this variable to debug the specified room without having to be tortured by the sequence editor. It is best to have a drop-down bar for this button to switch whether Force to run from this room first to ensure compatibility of other projects
Backlogging this one as I don't think it is a bad idea at all...
What if there's some code that needs to run before in previous rooms?
What if there's some code that needs to run before in previous rooms?
Then don't use this option?
What if there's some code that needs to run before in previous rooms?
To execute code at the start of the game, the ideal approach is to use gml_pragma("global"). This ensures that the code runs globally, making it available throughout your project. Here is an example:
gml_pragma("global", "init_code");
function init_code() {
// Your initialization code here
}
By placing your initialization logic in this function and using the gml_pragma directive, you can guarantee that it will be executed at the beginning of the game.
https://manual.gamemaker.io/lts/en/GameMaker_Language/GML_Reference/OS_And_Compiler/gml_pragma.htm
What if there's some code that needs to run before in previous rooms?
To execute code at the start of the game, the ideal approach is to use gml_pragma("global"). This ensures that the code runs globally, making it available throughout your project. Here is an example:
gml_pragma("global", "init_code"); function init_code() { // Your initialization code here }
By placing your initialization logic in this function and using the gml_pragma directive, you can guarantee that it will be executed at the beginning of the game.
https://manual.gamemaker.io/lts/en/GameMaker_Language/GML_Reference/OS_And_Compiler/gml_pragma.htm
fair enough, just wanted to say that because I've seen a lot of projects initialize throughout rooms but alright
Is your feature request related to a problem?
When testing a specific room in a GameMaker project, developers currently need to move that room to the beginning of the room list. This can be inconvenient, as it requires modifying the room order, which may not be desirable for the final game structure.
Describe the solution you'd like
Implement a feature that allows developers to run and debug the currently open room without having to change its position in the room list. This would enable developers to test the room they are actively working on without disrupting the predefined room order. Additionally, since multiple rooms can be open simultaneously, place the "Run" and "Debug" buttons next to the tool icons within each open room window for easy access.
Describe alternatives you've considered
No response
Additional context
No response