• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker Returning Physics_World Variables

T

THEPHENOM

Guest
Hello,
does anyone know how to return values such as gravity in the current room or if physics are enabled in the current room? I have looked at:
but these only list setter-ish functions. I want to do something like this:

Code:
if(room_has_physics(room)==true) {
        physics_pause_enable(true);
}
If I trigger the physics_pause_enable(bool) function in an room that doesn't have physics enabled, it produces an Error.
 
T

THEPHENOM

Guest
Create an object obj_room_got_physics and add it to the rooms that got physics.

And then just check in the room for the object.
Thank you. Somewhat disappointing that there is no other possibility to access those Physics_World Variables other than to hardcode it via objects or variables. Would be really nice if yoyogames could implement a few getter for those Physics_World variables.
 
Top