4rpl:commands:msg_frameadvance
                
                                                            
                    
Differences
This shows you the differences between two versions of the page.
 
| Next revision | Previous revision | 
| 4rpl:commands:msg_frameadvance [2021/02/13 15:06]  – created virgilw | 4rpl:commands:msg_frameadvance [2025/02/14 14:57] (current)  – external edit 127.0.0.1 | 
|---|
| "MSG_FrameAdvance" is a message that is automatically sent every frame of the game. Any listening script can receive this message. Frames happen at up to 60 times per second. See [[GetMouseDelta]] for an example of what this might be good for. | "MSG_FrameAdvance" is a message that is automatically sent every frame of the game. Any listening script can receive this message. Frames happen at up to 60 times per second. See [[GetMouseDelta]] for an example of what this might be good for. | 
|  |  | 
|  | The frame advance process is as followed: | 
|  | Loop 1, 2, or 4 times based on speed: | 
|  | { | 
|  | PreUpdate | 
|  | Units | 
|  | PostUpdate | 
|  | return to top of loop | 
|  | } | 
|  | FrameAdvance | 
|  | If high FPS is on, run FrameAdvance again for the interpolation frame | 
|  | Start next update | 
|  | \\ | 
| ===== Examples ===== | ===== Examples ===== | 
| <code 4rpl> | <code 4rpl> | 
|  |  | 
| </code> | </code> | 
|  | <code 4rpl>RegisterForMSG("MSG_FrameAdvance" "Frame")</code> | 
|  |  | 
| <=[[4rpl:start| Index]] | <=[[4rpl:start| Index]] | 
 
                4rpl/commands/msg_frameadvance.1613228761.txt.gz · Last modified: 2025/02/14 14:56 (external edit)