User Tools

Site Tools


4rpl:commands:getgameframecount

Index

:!: Available in version 1.3 and later.

GetGameFrameCount

GetGameFrameCount

Description

Pushes the game's frame count to the stack. The frame count increments by 1 for every frame of the game. This happens when the game is paused and every time the screen is refreshed. Typically this is at 60fps, which means the frame count can go up by 2 for every game frame. When high FPS is disabled, the frame count increases by 1 for every game frame.
Also refer to GetGameUpdateCount and GetGameTickCount for additional timer-based commands.

Examples

:Frame	
	#This function is set to get called by the MSG_FrameAdvance message.
	#This message comes every game frame (60 fps when in high fps mode).
	#This callback also happens when the game is paused. Exercise caution when using this callback since
	#it runs on the 'in-between' frames between game updates as well as on game update frames.
        Trace(GetGameFrameCount)
 
:Once
	RegisterForMSG("MSG_FrameAdvance" "Frame")

Index

4rpl/commands/getgameframecount.txt · Last modified: 2021/12/25 06:34 by Karsten75