Effect of calculations in functions on other functions

Gng
02 Mar 2024, 16:55

Hey all

I was wondering if calculations in functions or timers could affect other functions. For example:

Function Slinger

player.health = player.health - weapon.damage

Timer Slice

weapon.damage = enemy.damage + enemy.critical
Slinger
enemy.stamina = enemy.stamina - 3

(The actual codes are 100 lines)

When the timer fires, does Quest finish the Slinger function first and then move on to the next line, or do them both simultaneously?


mrangel
03 Mar 2024, 14:14

If a function is currently running when the timer becomes due, it will finish the current functions first. Quest only checks for timers when the last function returns.