Trigger API Reference DCEI Functions Game0 - funovus/editor-wiki GitHub Wiki
Table of Contents
- [Trigger API Reference\DCEI Functions\Game](#trigger-api-referencedcei-functionsgame)
* [void SetUpdateFrequency(float value)](#void-setupdatefrequencyfloat-value)
* [void ClearUpdateFrequency()](#void-clearupdatefrequency)
* [float GetUpdateFrequency()](#float-getupdatefrequency)
* [void SetSpeedFactor(float value)](#void-setspeedfactorfloat-value)
* [float GetSpeedFactor()](#float-getspeedfactor)
* [void SetVictory()](#void-setvictory)
* [void SetDefeat()](#void-setdefeat)
* [void SetVictoryForPlayer(int player, string result)](#void-setvictoryforplayerint-player-string-result)
* [void SetDefeatForPlayer(int player, string result)](#void-setdefeatforplayerint-player-string-result)
|
Trigger API Reference\DCEI Functions\Game {Trigger-API-ReferenceDCEI-FunctionsGame}
void SetUpdateFrequency(float value)
Changes how frequently a simulation update is called. The default of 1 means 16 FPS. Regardless what frequency is used, each simulation update will advance game time by 0.0625 unless SetSpeedFactor() is also used.
-
float
value
the frequency with which simulation updates are called. Supported values are [1/4, 1/2, 1, 2].
DCEI.SetUpdateFrequency(2)
void ClearUpdateFrequency()
Resets update frequency to the default frequency of 1, meaning 16 FPS.
DCEI.ClearUpdateFrequency()
float GetUpdateFrequency()
DCEI.LogMessage(DCEI.GetUpdateFrequency())
void SetSpeedFactor(float value)
Sets the speed factor for the simulation. The speed factor applies a multiplier to delta time in simulation updates, affecting how much time is processed in each simulation update. This will affect simulation results so it's recommended to only use it for slow motion effects with values like 1/64, 1/128, etc. Simulation update rate is now defaulted to 16 FPS with exactly 0.0625 delta time between updates.
DCEI.SetSpeedFactor(0.5)
float GetSpeedFactor()
DCEI.LogMessage(DCEI.GetSpeedFactor())
void SetVictory()
DCEI.SetVictory()
void SetDefeat()
DCEI.SetDefeat()
void SetVictoryForPlayer(int player, string result) {void-SetVictoryForPlayerint-player-string-result}
void SetVictoryForPlayer(int player, string result)
End the game in a victory for given player, with the given result.
DCEI.SetVictoryForPlayer(1, "Win")
void SetDefeatForPlayer(int player, string result) {void-SetDefeatForPlayerint-player-string-result}
void SetDefeatForPlayer(int player, string result)
End the game in a defeat for given player, with the given result.
DCEI.SetVictoryForPlayer(1, "Lose")