Intro Page

  • YES!!!!! <img src="smileys/smiley1.gif" border="0" align="middle" /> 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?

    Thanks for your patience everyone.

  • 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...

    Thanks in advance for your help...

  • mepis

    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

    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.

  • 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

  • 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 :)

  • Thanks, I will give it a shot... I know web design, and I know Android App Design so this should not be difficult to comprehend... No short cuts I need to put the work in.

    Thank you

  • ALLMarkMade sorry, I may not understand exactly the idea. Do you want to stop the spawning and then what do you want with the actual enemies that were there, you want them there for the next wave or you want them destroyed?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Are you switching to a different layout when you pause the screen? If so, use the on start of layout command to reset your spawning variable. Likewise, you have to have some function that un-pauses the game. You could always reset your spawning variable there as well.

  • gfigueroa and mepis - I have the spawns set at different Every X times. It starts off slow with just one and then with the one another and then another so the longer you stay alive the more things are coming at you. Yes, I am leaving the page on any hit of my hero or if he is pushed off the layout the game ends and takes you to option page to start again or go to the intro page.

    If I take a while getting back to the game as soon as I hit the start game button I get all the spawns at once because the Every X is still ticking even if I'm not playing the game.

    In order to keep the gradual flow for easy in the beginning to harder the longer you play the Every X needs to start from 1 each the game is started. It's not doing that for me, once the game is started if it gets to 300 seconds when the harder enemies would appear after the first game if you want to play again you immediately start getting the harder spawns and many of them right away instead of starting slow and it getting harder.

    I did go back and group everything and tried the deactivate group but that did not work. I tried the the Pause Plugin and while it worked pausing it does not reset the Every X count.

    The set time scale to "0" works fine but it's not resetting the Every X count.

    I've tried everything I just want when the game ends to stop the spawn count and when the game start and I mean actual game play for it to reset the spawn count so it starts from 1 second not at whatever time the game has been running, but actual game play time.

    Thanks

  • I'd have to see your stuff then to see how you have it set up, but I still think resetting whatever variable you are using to adjust your spawn rate when you un-pause the game would be the best thing to do. It sounds like the easiest thing to do.

  • mepis - Oh ok, I didn't try that. You're saying I can make a var for the Every Random X seconds spawns? I have them in a group called Enemies and there are 7 different things set to spawn at random times. When they go off the layout they destroy and then when their random X times comes up again "every(25,40)seconds" it re-spawns again and that cycle continues until you get hit and the game ends.

    So you're saying make a var resetting the Every Random X like I did for the time scale=0 or 1.0?

    Let me know and thank you...

  • That sounds like it should work, although I'm very out of it today.

  • You've been more than helpful thanks... I did look at the vars but was not sure how to set it up but I thank you for your time...

  • ALLMarkMade How did you ever make out with this?

  • VictoryX showed me how to do it without the Every X Command.

    Instead I'm using the variables and while you and others probably suggested it also he posted a capx shot which I was able to look at and follow to make it work for me.

    scirra.com/forum/topic80903_post474393.html

    However when trying your suggestions I learned a few things too so it was not in vain my friends and I thank you and everyone who jumped in to give me a hand because learned a little from each attempt.

    Thank you all

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)