I have a function that displays achievements. There is an array with Achievement ID, Title and Flag. When the right conditions are met, a parameter is passed to the function for the achievement ID, then the function displays the Title for the achievement in a popup and flags the achievement as "done" in the array. The popup is about 3 seconds long.
There may be conditions where 2 or 3 achievements are triggered (for different IDs) in the same second. In this case, I do not want all 3 popups to fire simultaneously, but one after the other (with popups being about 3 seconds each).
I tried the following but it seemed to fire the same achievement twice:
<if conditions are met for achievement ID1>
Call Function "Achievement" (1)
On Function "Achievement"
If AchDisplay=False then
<Do popup and array stuff>
Wait 3 Seconds
Wait 3 seconds
Call Function "Achievement" (Function.Param(0))
Not that a circular reference is the best idea anyway.. but recalling the function again with the same param did not fly. Grateful for any ideas. Plan B is to display simultaneous Achievements in varying areas of the screen, but it looks crusty. Thanks, -Steve
Edit: I see now that I'm experiencing this:
Note about using 'Wait' in functions
Note that in a function call, if you use 'Wait' then the function has finished by the time the next action after the 'Wait' runs. This means the function parameters are no longer available. You could work around this by copying function parameters to a local variable.