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