I'm having an issue...

0 favourites
  • 6 posts
  • Hi, my name is Legendary Player Fer. I'm kinda new on Construct 2, but I have some expierence in programming. Now...my problem is this: I'm making an arcade game, which consist of dodging some objects and scoring as long as you dodge them. Now...what I want is that "Every X score points", the game drops a power-up. What I managed to do is that every 15 points, a power-up is dropped, BUT, what happens here is that while you have 15 points (or 30, or 45, or 60, etc), the game keeps dropping power ups. I tied to use global/instance variables to make the game drop only one, but had no luck. Any help would be appreciated. Thanks in advance ^^

  • Non-triggered conditions will happen every tick as long as they are true.

    Adding a "trigger once while true" condition will make it only happen once.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the quick answer!! I'll try that as soon as I can and tell you how it came out

  • It worked!! But now, a different problem appeared. The score must strictly be a multiple of 15 in order for the power-up to appear, but, if youd dodge two objects at once, that doesn't always happen (for example, you have 14 points, you dodge two objects, then you get 16 points). Is there a way to make it drop a power up anyway?

  • maybe like this:

    global variable:

    next_powerup_at = 15

    and event:

    (score >= next_powerup_at) : spawn power-up AND add 15 to next_powerup_at

  • Yes!!! That's it!!! Thanks man!!!! It worked like a charm!!!! You guys rock!!!

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