ZachSmif's Recent Forum Activity

  • Here's how I would do it. Seems to work. Attached is the image for the setup.

    Basically the setup is this. Create a variable to hold the SpawnRate. This is the rate your enemies will generate and is based on your needs. 100 per minute or whatever. Whenever your score changes (event #3 in the image) you set a variable named SpawnRateModifier to your Score % 5 (using the modulus operator). This will return 0 if your score is divisible by 5 (so 5, 10, 15, 20, etc.). You also set a value called CheckSpawnModifier to 1 (more on this below).

    Then every tick (event #2 in the image) check two conditions: Is SpawnRateModifier == 0 (in other words, is the score divisible by 5) *and* is CheckSpawnModifier == 1. If it is then you do two actions. First, change CheckSpawnModifier to 0. We do this because we're doing this check every tick. If we didn't set this value and check it on every tick, the second action would keep firing the entire time until the score changed. Then for the second action we add 10 to the SpawnRate.

    So running this, after a few seconds when the score hits 5, the spawn rate is increased to 110 and stays there until the score reaches 10 at which point the SpawnRate is 120.

    Obviously you won't be changing the score every 2 seconds like I did in the demo so it's best to have a function that you call to modify the score and setup these variables at the same time. You can also create variables for SpawnIncrease (instead of a hard coded value) and add that to the SpawnRate.

    Hope that helps.

    Enjoy!

    Very good code!

    That works well but I still need the system event timer to go from 3.5 down to 3.4, 3.3, 3.2...etc every 5 score.

    any ideas?

    I will attach the .capx file

  • Hey Devs,

    I am having troubles increasing the spawn rate of my game.

    What I need to do is increase the spawn rate when score reaches 5. Not only does the spawn rate need to increase when the score is 5 but it needs to continuously increase every 5 score.

    I have attached an image with my current setup. Any ideas? Thanks! [/attachment:jf7td12x]

  • For the first question it's pretty simple, just add a condition to check for when the score is 5 then add an action to set the bullet speed to 500.

    For adding 100 to the speed every 5 seconds you could make an every tick event with an action to set the speed with the expression:

    int(score/5)*100+initial_speed

    Where initial_speed is whatever the bullet speed started at, or rather what speed you want it to start at.

    That worked and it helped me with a few more of my other questions....

  • Hey Devs,

    I am curious on how you would increase bullets speed if score is = 5?

    ex: if score = 5 then increase bullet speed to 500

    Not only am I curious as to that but how would I increase the bullet speed for every +5 scored?

    ex: for every 5 score increase bullet speed by 100

    I know the basics but when it comes to continuously increasing by increments I get super lost.

    Any help would be great!

    Thanks!

  • Thank you guys so much for your help. I will post the finished product soon.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey Guys,

    I am a total noob when it comes to programming with construct.

    The simple task I would like to create is a Name picker. Not a random name generator. But a program that lets you populate names into a field, hit a button and it spits out one of the pre-writen names you put into it.

    I have no idea where to start. Any help would be great.

    Thanks

  • Hey Guys,

    New to the Construct 2 engine. I have been using the "Free" version for about a week now...It is AMAZING!!! So I just purchased the Personal version. Cant wait to start adding more events and layers.

    A little about myself. I have been in the United States Marine Corps since 2007, I have my Bachelors of Arts in Video Game Design. I am currently working for a company called Premiseone. I am the special systems tech for their team. I started my own Photography business/design business called smithdesignz.com.

    You guys can tune in on our website biglipradio.com every Wednesday around 6pm to watch our live streaming show.

    My kids and I also have our own YouTube channel called SlayZombi. We just recently started a series called "Defend this House" Check it out.

    I am currently going through CodeAcademy.com in order to broaden my programming languages. I play many of video games but get the most entertainment out of creating them.

    I am looking forward to using this engine and have already created a game, I can't wait to use the Personal version to make the game even better. I am also looking forward to working with all of you great people. If your looking for a collab partner, I can do pretty much anything.

ZachSmif's avatar

ZachSmif

Member since 6 Sep, 2013

None one is following ZachSmif yet!

Connect with ZachSmif

Trophy Case

  • 11-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies