Post subject: PSXjin: Lua display, frame advance
Active player (264)
Joined: 4/15/2010
Posts: 197
Location: England
Let's say I have a simple lua HUD:
Language: lua

local last_x = 0 function display() local x = memory.readdword(0x1B90B4) local dx = math.abs(last_x - x) gui.text(0, 0, string.format("%04dx, %04ddx", x, dx)) last_x = x end gui.register(display)
The value dx behaves correctly except when I'm using frame advance. In that case, the value is always 0. How do I make the value update correctly in that scenario? Thanks.
Retired smw-96, smw any%
Spikestuff
They/Them
Editor, Publisher, Expert player (2642)
Joined: 10/12/2011
Posts: 6438
Location: The land down under.
emu.frameadvance()
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. Something better for yourself and also others.
Active player (264)
Joined: 4/15/2010
Posts: 197
Location: England
Spikestuff wrote:
emu.frameadvance()
You're right and display() should be in a while true loop. Of course. Thanks.
Retired smw-96, smw any%