Random wait seconds glitch

Discussion and feedback on Construct 2

Post » Wed Apr 17, 2013 12:37 pm

Hey Guys,

At the start of my 'Actual Game' layout my game chooses a random value of seconds for it to drop power ups.

Everything works fine except for one thing, if I sit on another layout like the Menu for 20+ seconds (more than the amount of seconds per drop) then start playing the game, all the power ups fall at once then the game continues along normally.

If I just quickly go from the menu to the actual game without waiting, it all works fine.

Any ideas?

Thanks, Dan.
B
7
S
2
Posts: 75
Reputation: 1,100

Post » Wed Apr 17, 2013 12:41 pm

Have the spawn or countdown happen in a deactivated group, then active the group when the level begins.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 929
Reputation: 9,356

Post » Wed Apr 17, 2013 3:12 pm

I tried exactly that earlier but basically as soon as that group activates it drops all the powerups then goes back to normal just as before.
B
7
S
2
Posts: 75
Reputation: 1,100

Post » Wed Apr 17, 2013 3:54 pm

Don't start the timer until the layout starts.
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418

Post » Wed Apr 17, 2013 11:14 pm

It's not a timer really, its "every Random(10-20) seconds". And this event sheet isn't accessed until the game itself starts, not the menu.
B
7
S
2
Posts: 75
Reputation: 1,100

Post » Thu Apr 18, 2013 1:15 pm

Maybe it's a bug @Ashley?
B
7
S
2
Posts: 75
Reputation: 1,100

Post » Fri Apr 19, 2013 10:49 am

This is the only thing stopping my game from launching so help would be appreciated :)
B
7
S
2
Posts: 75
Reputation: 1,100

Post » Fri Apr 19, 2013 12:14 pm

This is no bug its just he machanic from Wait.

I got this problem also some weeks in front of you, and Ashley tried to help me unstand Wait. This is what i understood:

It saves your actual time stamp and add to this X seconds, lets call this time stamp Actiontime. As soon as the realworld time hit Action Time the Events get fired. Cause you do this in a loop you save X Actiontimes and their Events. Now you open a Pop-up, you think your game doesnt run forward but the Real World time does it.

So after you leave the Pop-up Construct ask something like if actiontime > timestamp(real world time) fire Events. And yeah cause this is true at multiple Actiontimes it fires instead multiple Events.


Im not sure how to fixx your problem, for that I would need an example .capx. Than I will try it.Darklinki2013-04-19 12:15:35
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Fri Apr 19, 2013 12:21 pm

If you think it's a bug make a post in the Bugs forum following the full procedure. It's impossible to comment without a .capx.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Sun Apr 21, 2013 11:54 am

Is it possible to take a new timestamp on the start of a layout? That would seem to fix the problem.
B
7
S
2
Posts: 75
Reputation: 1,100

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests