gadget:GameProgress

gadget:GameProgress

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
LEDZ
Posts: 66
Joined: 27 Jun 2011, 13:43

gadget:GameProgress

Post by LEDZ »

I'm trying to accomplish the function of stating how far behind a player is from catching up with the simulation inside a gadget:
GameProgress() --> "serverFrameNum" ( called every 60 frames, calculating delta between GameFrame and GameProgress can give an ETA about catching up with simulation ) New in 0.83.x
However, GameProgress() doesn't seem to be called at any time (it's in the synced part of my gadget).

Any ideas on this?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: gadget:GameProgress

Post by jK »

isn't it obvious that this callin is unsynced? (it only gets called when you reconnect and NOT for all players)
LEDZ
Posts: 66
Joined: 27 Jun 2011, 13:43

Re: gadget:GameProgress

Post by LEDZ »

I forgot to mention that I tried using it in unsynced as well; still nothing.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: gadget:GameProgress

Post by Licho »

you must add it to your widget handler.
Post Reply

Return to “Lua Scripts”