TommyR's Recent Forum Activity

  • TommyR: SpeedInc is the value that handles the augmentation of the speed.

    Having it as a global variable, you are sure that it raises on a regular basis. You also make sure that each new instance, when it's created, is applied the current speed (SpeedInc * 100).

    I don't see the need for an instance variable here that would be different for each instance. Unless that's what you want to do, but as far as I understood your issue in the first post it wasn't about that. You wanted newly created instances to have a speed in relation to a value that evolves over time.

    The bullet speed you talked about originally is about the speed at which bullets fired by enemy instances will travel ?

    I assessed it was actually the moving speed of enemies instances, using the bullet behavior.

    Perhaps you should explain clearly what is it you are looking to do exactly. We already know what you did, what you experience it does, we're missing the information of what you intended it to do actually do precisely.

    Layout size: 1920 x 1080

    Global variable Timer: 0

    Enemy1: Bullet behavior with bullet speed 100

    Every 1 sec, enemy1 spawn

    Once timer starts, spawn enemy1 with bullet speed of 100 (no issues with that).

    Once timer hits 10 sec, is it possible to set all enemy1 speed to 200? The only enemy1 that changes it's speed to 200 are the new enemy1 that spawn on screen, while the old (enemy1) still on screen, still have the speed of 100.

  • In your "Every 1 sec" you are hard coding the speed at 100, instead of rather using the value of the variable you are incrementing.

    Also, the fact you are checking for "Timer = 20" will only work the moment your Timer value is equal to 20. As soon as your Timer is equal to 21, your speed will "revert" to 100.

    You have kind of the correct idea of going about things but not correctly executed.

    Global Variable Timer number Default value 0

    Global Variable SpeedInc number Default value 1

    System > Every 1 Sec

    .. Create object > Enemy

    .. Set bullet speed to SpeedInc * 100

    System > Timer = 20

    .. Add 1 to SpeedInc

    System > Timer = 30

    .. Add 2 to SpeedInc

    For the Timer, you can also use the scirra.com/manual/167/timer Timer behavior (set on Regular type) that could add SpeedInc value to itself every 10 secs

    On timer "SpeedInc"

    .. Add SpeedInc to SpeedInc

    Thanks for the response, but you lost me on the Global variable speed in default to 1. Would I still need to add an instance variable to each enemy?

  • So every 10 seconds I want to increase the enemy bullet speed by whatever number I choose. So I've done the basics. I've created a global variable called 'Timer', and inside the enemy I've created an instance variable called 'SpeedInc' with initial value of 0. The bullet speed for the enemy is setup at 100, at start of layout. Once the timer hits 10 sec, I changed the initial value to 1 for SpeedInc, which changes the bullet speed from 100 to 200. When the timer hits 10 sec, the enemies that spawn first DO increase their bullet speed, but the problem is is that, the new enemies that spawn later, their speed is at 100 and not 200. This is what I did:

    System > Every 1.0 sec > Create object > enemy 1 > Set bullet speed 100 and Set bullet angle of motion 180.

    Then I created a sub event:

    System > Timer = 12 > enemy 1 > Set SpeedInc to 1 > Set bullet speed 200

    I forgot to mention that I put the enemy 1 in a group. So in the event sheet it pretty much looks like this:

    System > Timer = 10 > System > Set group enemy 1 activated

    System > Every 1.0 sec > Create object > enemy 1 > Set bullet speed 100 and Set bullet angle of motion 180.

    Then I created a sub event:

    System > Timer = 20 > enemy 1 > Set SpeedInc to 1 > Set bullet speed 200

    System > Timer = 30 > enemy 1 > Set SpeedInc to 1 > Set bullet speed 400

  • How do I increase the speed of the object / enemies if the player reaches a certain score, or if the player reaches a certain time. But only for a certain duration.

    Let's say, every 5 seconds on start of layout, an object will spawn with a bullet speed of 500. Then if player reaches 20 pts, the object will spawn every 3 seconds with a bullet speed of 600. This will last only for let's say 6 seconds, then it will go back to the default speed.

  • Use the timer behavior rather then the wait event. Also, in your specific case, you will need the load screen and game screen to use the same event sheet.

    All layouts are using the same event sheet. Isn't it possible to use that wait event?

  • So I have made a splash screen, loading screen and a game screen. From Splash screen to loading screen works fine, but trying to jump to game screen from loading screen does not. It just freezes on loading screen.

    System > Start of layout > System > Wait 3.0 sec

    System > Go to load screen

    System > Wait 3.0 sec

    System > Go to Game screen

  • ...[/quote > > But in Tekniko's tutorial, he only has 1 event sheet that he uses. Why do I need a separate event sheet for that particular layout? I've went back and watched his video tutorial on "loading, Main, Game screens, and I can see he only uses 1 event sheet and 3 layouts (esLoading, esMain and esGame).

  • ...

    Yup, I had a feeling it had to do with that. Still trying to get my feet wet with this program. Thanks Korbaach.

  • Should work, if it is set up the way you say..

    Is the event sheet these events are on connected to the layout?

    If it is and you can't figure out what's wrong please share your capx so we can have a look..

    Stumped

  • OK so I am stumped. In my event sheet: Touch > On Touched NewGame > System > Go To Scene 1

    I go to preview. My splash screen shows up fine for 4 sec. Then goes to the Main Game Screen. There in the main game screen, I created my own button called "NEW GAME" using inkscape. When I go preview it though, once the main game screen shows up, I try clicking on that button but nothing happens. Mouse input is set to "yes".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For each layout > Project Settings > First Layout

    Do I need to set that as what ever layout I am in?

  • is very simple

    What you'll need to do is:

    Under events, you have logo and menu. Can't you just have 1 event sheet for your whole entire game?

TommyR's avatar

TommyR

Member since 14 Sep, 2014

None one is following TommyR yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies