Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timer never seems to call callback #1

Closed
michaelwschultz opened this issue Sep 12, 2021 · 2 comments
Closed

Timer never seems to call callback #1

michaelwschultz opened this issue Sep 12, 2021 · 2 comments

Comments

@michaelwschultz
Copy link

michaelwschultz commented Sep 12, 2021

Running version 2.3.4

I'm simply trying to run a function after 60 frames. Even on repeat, this function never gets called. I've placed this in a create event. Does it need to live someplace else?

showMessage= function() {
  show_debug_message("test timer")
}

timer(showMessage, 60, true)
@MorsGames
Copy link
Owner

Your code seems correct to me. Do you call timer_system_update() anywhere within your code? You can put it to the Begin Step event a persistent object you create at the start of the game.

Oh, and you should also use timer_system_room_end() alongside it, at the Room End event of the same object.

@MorsGames
Copy link
Owner

Well, I'll just assume that the issue is resolved and close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants