Hello all. This is my first post, and hopefully not my last! I have looked at the forum search results for similar topics, but I’m still scratching my head on this one.
Scenario: Player picks up a power up that increases fire rate for 5 seconds Issue: If player picks up an additional power up, it does not “reset” the WaitForSeconds call Desired resolution: If player picks up an additional power up before WaitForSeconds “ends”, WaitForSeconds is “reset” to the power up’s “bonusDuration”
I think I’m just not fully grasping coroutines or the limitations/implications of WaitForSeconds. Any help or suggestions would be greatly appreciated!
Hey @StarManta , if the if (Time.time < powerupLastsUntil) is in the Update method, it keeps returning true and ends up multiplying the fireRate by bonusSpeed once every frame. I tried putting it in the FireRatePowerUp method, but then fireRate is still unable to revert back to the original value.