# Intro Page

Get help using Construct 2

### » Tue Nov 12, 2013 10:41 pm

I'm still learning and I'm sure it's something I'm doing wrong. I think I'm just going to start from scratch and make sure I organize and implement things a little better.

I did see the Every X seconds options but not after I set the IsPause.

I'm confused I'm sure.

Thanks
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

B
41
S
20
G
6
Posts: 367
Reputation: 7,540

### » Tue Nov 12, 2013 11:42 pm

You basically want to add the IsPaused condition to your random generation algorithm (how ever you have that set up) So add the condition, IsPaused = 0 then randomly generate (or spawn) your object.

When you pause the game, you want to set IsPaused to 1. So if the game is paused then your random spawn generation should stop because IsPaused doesn't equal 0.

In more english terms, think of 1 as being true and 0 as being false. So you would say (assuming for you random spawn instructions), "If it is time to spawn an enemy (or object) and the game is not paused (IsPaused = 0) then go ahead and spawn an enemy."

Likewise, you would say, "When the game is paused then go ahead and set IsPaused equal to 1. When I unpause the game then go ahead and make IsPaused = to 0."

That way your game has a check to see if the game is paused. If it is, then don't do anything. But if it isn't paused and it's time to spawn something, then go ahead and do it.
Kurieus
Come visit and play Blast Box!
B
15
S
3
Posts: 205
Reputation: 1,349

### » Wed Nov 13, 2013 3:27 am

Ok I will try that thank you....
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

B
41
S
20
G
6
Posts: 367
Reputation: 7,540

### » Thu Nov 14, 2013 1:10 am

@gfigueroa, Yes I did see your link but that was (to my understanding) a pause button. I need something that when the game ends/resets the Spawn clock (Every X) starts from 1 so I don't have a thousand spawns if I'm reading the intro screen.

Thanks
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

B
41
S
20
G
6
Posts: 367
Reputation: 7,540

### » Thu Nov 14, 2013 4:32 am

@ALLMarkMade I did something similar, I setup the Pause button and if the LAYER for the intro is visible, set PAUSE state to Pause, this will stop the creation of spawns. It did work for me, my "intro" page was actually an in-game tutorial and in that way I was able to control the spawns until the player decided to press a key.
B
8
S
3
G
1
Posts: 135
Reputation: 2,209

### » Thu Nov 14, 2013 10:15 am

YES!!!!! That's exactly what I'm trying to do. I have your Pause plugin installed (Thank you for that) I just need to set it. Is there a guide or tutorial you have here already?

Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

B
41
S
20
G
6
Posts: 367
Reputation: 7,540

### » Thu Nov 14, 2013 9:13 pm

@gfigueroa and @Mepis, I think you both are correct and both your solution work. However I just realized I'm asking for the wrong thing.

What I need is for the Every X to STOP and RESET each time the game ends or you leave the page. It probably is pausing and then picking back up at it's highest count and that's not what I want.

What I need is for anytime the game ends or you leave the page I want the Every X to stop counting and them when you return to the page it starts counting when you click the start game button, but from 1 or zero which ever.

My game starts out easy and progressively gets harder the longer you play it so I need it to reset every time you start...

Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

B
41
S
20
G
6
Posts: 367
Reputation: 7,540

### » Thu Nov 14, 2013 9:34 pm

I think I have it set up according to what you said to do but I do not understand this part...

Add the extra condition, if IsPaused = 0 AND Every X Seconds

I understand it I don't know how to implement it. I don't see this option anywhere.

Thanks[/QUOTE]

You could always tie those events below a group, and set that group deactivated when you press the help button. when you click button to go back, also activate given group. Thats what I do with all my spawn things lately :) clean and efficient.
Who dares wins
B
57
S
17
G
21
Posts: 1,880
Reputation: 19,623

### » Thu Nov 14, 2013 9:44 pm

Yes I thought about that but realized you can't go back and regroup things (Unless I missed it) so that was going to be my last resort but if you say it works I'll put in the work no problem.

I just need the Every X to not only stop spawning when off the page but stop counting and reset each time you start the game. I have more difficult spawns that start after a minute and then two minutes, then three minutes and so on.

So when it's not stopping the count if you're on the your 3rd attempt 3 minutes later you get hit with the harder spawns right away and I don't want that.

So will this be the fix for that?

Thank you
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

B
41
S
20
G
6
Posts: 367
Reputation: 7,540

### » Thu Nov 14, 2013 10:06 pm

every event you place under the group will not start when its deactivated. I believe it will end certain loops.

Also, i use multiple groupsiie, user controls, enemy spawn, layout start, menus.

when applied correctly, you can disable lots of functionality when you are at a certain view ..

At first I did lots of "when visible" things, but that takes lots of work and lots of places to update things when something needs changing.

With the groups however, you can move stuff in lots of groups, and groups of sub groups. you can even stuff groups in loops as part of a while or for loop, and have parts of the loop as a conditional factor.

Not only will it help in limiting user input or disbling game activity, it also forms your code in a nice overview :)

Who dares wins
B
57
S
17
G
21
Posts: 1,880
Reputation: 19,623

PreviousNext