Page 1 of 1

Timer problem when compiling to .exe file

PostPosted: Thu 12 Jul 2018, 06:23
by One-half BH
I'm having trouble with the timer of my game when I compiled it to an executable file. It seems that the game ignores some of the event timers that I included in the game when I converted it to .exe file. The resulting game becomes a disaster, because some of the objects are not properly timed. Please help, I'm so close to finishing this game. :D

Re: Timer problem when compiling to .exe file

PostPosted: Thu 12 Jul 2018, 10:56
by Lizard-13
EDIT: Are you talking about common timers actions/conditions or about the extension "Timer events" (the special time events available for native only)?

GD is missing some libraries at compiling time, but doesn't seem to be related (it could be related if you are using the special timer events extension).

Unlike previews, on exported games you can switch scenes, this can generate unexpected behaviors with global variables, as a previous scene can modify it from the default value you used on previews. If the timer events don't use global variables at all it could be a bug indeed :|

If your game is almost finished maybe you don't want to do it... but if you can't fix it you can send me the project in a private message, so I can debug it (I can, at least, confirm if it's a bug) :)

Re: Timer problem when compiling to .exe file

PostPosted: Thu 12 Jul 2018, 13:09
by One-half BH
Hello,
Thanks for the answer. I fixed it by using the extension 'Timer events' instead of the common timer actions. However, on the game scene, I want it to wait for 5 seconds before playing the music, but it only plays when I press the close button of the window. If I hold on to the close button, it will play the whole background music of the game. If I let got, it'll stop.

I can't send my project for it exceeds the maximum allowed size. :shock:

Re: Timer problem when compiling to .exe file

PostPosted: Thu 12 Jul 2018, 14:28
by Lizard-13
Can you share the compiled game with me?, I want to try that bug, because is crazy! :D
Upload the compiled game (maybe in a zip) to a file storage server (Google Drive, Microsoft OneDrive, Mega, etc.) and pass me te link (in a PM if the game is private).

Re: Timer problem when compiling to .exe file

PostPosted: Sun 15 Jul 2018, 07:49
by One-half BH
Hi, I've already PMed my project to you. Thanks! :)

Re: Timer problem when compiling to .exe file

PostPosted: Sun 15 Jul 2018, 11:20
by Rikazu
I did this thing by having a variable added to TimeDelta(); then have a condition to check whether its greater than or equal to 5 seconds, thus I play the sound that time; which I only execute this once.