• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTclient FPS get/set

speery

New Member
Joined
Mar 16, 2017
Messages
26
Reaction score
1
Anybody know how to make a script to get / set FPS on otclient?

Code:
function FPSlimit()
  if FPS <= 10 then
    setfpslimit = 60
  else
    setfpslimit = 10
  end
end
 
Code:
g_app.setForegroundPaneMaxFps
Or this
Code:
g_app.setBackgroundPaneMaxFps
And to get
Code:
g_app.getForegroundPaneFps
Or this
Code:
g_app.getBackgroundPaneFps
 
Code:
g_app.setForegroundPaneMaxFps
Or this
Code:
g_app.setBackgroundPaneMaxFps
And to get
Code:
g_app.getForegroundPaneFps
Or this
Code:
g_app.getBackgroundPaneFps

attempt to compare function with number

if g_app.getForegroundPaneFps <= 10 then

From
Code:
function FPSlimit()
  if g_app.getForegroundPaneFps <= 10 then
    g_app.setForegroundPaneMaxFps(60)
    modules.game_textmessage.displayFailureMessage(tr('FPSlimit OFF!'))
  else
    g_app.setForegroundPaneMaxFps(10)
    modules.game_textmessage.displayFailureMessage(tr('FPSlimit ON!'))
  end
end
 
Add () to the end of g_app.getForegroundPaneFps?
Lua:
function FPSlimit()
  if g_app.getForegroundPaneFps() <= 10 then
    g_app.setForegroundPaneMaxFps(60)
    modules.game_textmessage.displayFailureMessage(tr('FPSlimit OFF!'))
  else
    g_app.setForegroundPaneMaxFps(10)
    modules.game_textmessage.displayFailureMessage(tr('FPSlimit ON!'))
  end
end
Sorry I am just guessing ;)
 
Add () to the end of g_app.getForegroundPaneFps?
Lua:
function FPSlimit()
  if g_app.getForegroundPaneFps() <= 10 then
    g_app.setForegroundPaneMaxFps(60)
    modules.game_textmessage.displayFailureMessage(tr('FPSlimit OFF!'))
  else
    g_app.setForegroundPaneMaxFps(10)
    modules.game_textmessage.displayFailureMessage(tr('FPSlimit ON!'))
  end
end
Sorry I am just guessing ;)

That error is not showing anymore, but awalys show FPSlimit ON, but do not change the FPS :(
 
I think foreground fps is for Framework and the background for game fps. Try to change it. Also I'm thinking for what is that function? I don't see any logic reason behind it.
 
I think foreground fps is for Framework and the background for game fps. Try to change it. Also I'm thinking for what is that function? I don't see any logic reason behind it.

It's to bad computers, thank you! It was it, solved!
 
Back
Top