Is there something wrong?

0 favourites
  • 13 posts
From the Asset Store
Be quick and choose whether the shown equation is right or wrong.
  • I try execute but don't work it crashes, When I remove the while it works

    I want the objects appear at different times.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your While loop will never end as there is nothing in it to change "aux". At a guess, get rid of While altogether.

  • In your while statement, you are saying while aux < 5 but you are not incrementing the aux. That means aux will always be less than 5 and the loop will repeat for ever (or at least until you run out of memory and the game crashes). This is called an Infinite Loop.

  • Never ending loop

  • Oh thx, guys

  • Change, is it better?

  • This change will stop the endless loop but it doesn't do the same thing. From this image, it looks like you are just trying to make your objects flash after touching the text object. If this is correct, I would suggest you make use of the flash behavior instead of using your events the way you have them set up.

  • I'm trying to do something like a Whack A Mole.

    What better way to do this?

  • I think that looks like it could work as a whack mole, but I would set the every 2.0 seconds for example to every random(1)+1 this would make it between 1 and 2 seconds or you could random(2)+1 which would be between 1 and 3 seconds. same as random(1,3)

    just figured you might like it more random.

  • I think that looks like it could work as a whack mole, but I would set the every 2.0 seconds for example to every random(1)+1 this would make it between 1 and 2 seconds or you could random(2)+1 which would be between 1 and 3 seconds. same as random(1,3)

    just figured you might like it more random.

    Ohhh My God,

    as not thought of that?

    Thanks guy

    i love you )))

  • glad to help

  • :) glad to help

    How do I stop them when I click on an object?

  • How do I stop them when I click on an object?

    I'm a little tired right now so sorry if this answer is wrong, also sorry for replying late.

    Do you want them to stay popped up or not pop back up. I'll assume stay down.

    I think you would need a local variable like onHit and set it to zero or false to begin with.

    So it could be like: Every random(0,1) seconds

    onHit = false set visible

    now when you hit the mole set onHit to True and it shouldn't pop up anymore. Then you could also play like an animation or sound effect or explosion to mark that you got a hit and set the moles invisible and it should stop popping up.

    Edit: Another possibly easier option would be to just destroy the mole.

    On hit mole destroy

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