-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New component: Dynamic FPS Change #124
base: master
Are you sure you want to change the base?
Conversation
There should also be a new release. Last one has been 2 years ago. |
That is up to Cam... It will hopefully update during the holidays... |
@4Luke4 This stops working after leaving candlekeep and viewing the Sarvok cutscene in BGEE. Steps to reproduce:
WeiDU.log
|
@snaphat |
Any reason using EEex_Opcode_AddListsResolvedListener(function(sprite)
-- Sanity check
if not EEex_GameObject_IsSprite(sprite) or not sprite.m_pArea then
return
end
--
local actuallyInCombat = sprite.m_pArea.m_nBattleSongCounter > 0
--
if EEex_GameState_GetGlobalInt("gtCutSceneMode") == 1 or actuallyInCombat then
if EEex_CChitin.TIMER_UPDATES_PER_SECOND ~= 30 then
EEex_CChitin.TIMER_UPDATES_PER_SECOND = 30
end
else
if EEex_CChitin.TIMER_UPDATES_PER_SECOND ~= 60 then
EEex_CChitin.TIMER_UPDATES_PER_SECOND = 60
end
end
end)
-- Set/Reset helper var to 1/0 upon entering and exiting cutscene mode --
EEex_Action_AddSpriteStartedActionListener(function(sprite, action)
local actionID = action.m_actionID
if actionID == 121 then
EEex_GameState_SetGlobalInt("gtCutSceneMode", 1)
elseif actionID == 122 then
EEex_GameState_SetGlobalInt("gtCutSceneMode", 0)
end
end) Or just using EEex_Opcode_AddListsResolvedListener(function(sprite)
-- Sanity check
if not EEex_GameObject_IsSprite(sprite) or not sprite.m_pArea then
return
end
--
local actuallyInCombat = sprite.m_pArea.m_nBattleSongCounter > 0
--
if sprite.m_inCutScene == 1 or actuallyInCombat then
if EEex_CChitin.TIMER_UPDATES_PER_SECOND ~= 30 then
EEex_CChitin.TIMER_UPDATES_PER_SECOND = 30
end
else
if EEex_CChitin.TIMER_UPDATES_PER_SECOND ~= 60 then
EEex_CChitin.TIMER_UPDATES_PER_SECOND = 60
end
end
end) |
The first proposed solution should work, we just need to take into account all the actions (IDs) that can start a cutscene (not just 121...) |
Some additional information in BGEE while utilizing the first proposal:
|
I see. |
This component will automatically adjust FPS during playthrough.
When in combat or cutscene, will lock FPS to
30
. Otherwise, will set them to60
.