Ask here your questions to get help using GDevelop.
By Umar
#61945 For some odd reason the timer is not being created. And the event is acting on its own line there is no timer condition applied to it??? Please anyone Tell me what am I doing wrong here :?
Attachments
Timer.png
Timer.png (228.65 KiB) Viewed 421 times
By Umar
#61946 I solved the first problem but the second is still there :? Event number 8 is acting like there is not timer condition? Like why the hell it is acting that there is no timer condition there?
User avatar
By ddabrahim
#61947 In my opinion you should remove the trigger once condition when you increase the value of the Round variable because you trigger the action to add +1 to the Round variable only Once when the variable Round is < 5. Unless you change the value of the Round variable to 5 somewhere else then change it back to be <5, it is going to be triggered only once during the game regardless the value of the timer.

Also you may reset the timer every frame so it is never be > 2 depends on the conditions need to be met to reset the timer...

In case you are using the trigger once condition because you don't reset the timer every frame but only once in a while and you don't want to increase the Round value every frame as long the timer is > 2, you may better off using a variable to control it. For example use a variable called "reset". And check the value along with the timer. When it value is = 0 and the timer is > 2, Do + 1 to Round and set the value of reset to = 1. This way you won't be increasing the value of Round any more even not if the value of the timer is > 2. And when you reset the timer, set the value of reset back to = 0. This way, you going to increase the value of Round only once every time the timer has been reset and reached 2 seconds.

Alternatively, you can also reset and pause the timer right after you increase the Round value and unpause whenever you want.

Also, when you reset the timer the AND block in the event is useless. By default all condition need to be true to trigger the action, the AND block makes no different in this case unless you missing an OR block there and you want to reset the timer if the PauseCamera = 1 OR all other is met inside the AND block.