This variable holds the running speed of all rooms (and the game) in game frames per second. Note that this is NOT the FPS (frames per second) but rather the number of game steps that GameMaker Studio 2 will try to maintain each second.

IMPORTANT! This variable is maintained for Legacy Support only, and should not be used as it no longer sets the speed for a single room, but for ALL rooms in the game. To change game speed you should instead be using the function game_set_speed.






alarm[0] = room_speed * 10;

The above code uses room_speed to set an alarm to run for 10 seconds. Using the variable in this way will ensure that the alarm runs for 10 seconds, no matter what speed is set for the room.

上一页: General Room Functions And Variables
下一页: room_height
© Copyright YoYo Games Ltd. 2018 All Rights Reserved