How do I

  • Hello

    In C2 is it possible to do this -

    have several sprites that light up sequentially with like a second inbetween. The user has to try and hit space on the last sprite. If they fail a message is displayed along the line of 'Bad luck, try again' if successful a message like 'well done' is displayed.

    I am using the free version of C2 but if this can be done then I'll be purchasing a full license.

    Thanks everyone

    Bazzman90x

  • Yes, you can easily did this with the free version of C2.

  • hey Joskin, thanks for replying, are you able to show how it can be done?

    I tried to do a For loop to switch on each sprites, 'lit' animation, with a separate event to detect 'space' bar press which stops the loop but the loop just continues. I thought one way would be to assign a variable to each 'lit' animation frame and then do a compare.

    thanks for helping out.

  • Your loop should have another condition, for example a global variable called "spacePress" with a value of 0.

    On space pressed set the value of "spacePress" to 1.

    And in you loop add the condition : spacePress = 0. Then when space will be pressed, spacePress will take the value 1 and the loop will stop.

  • Global? I was thinking a local variable for each sprite would be needed.

    With your suggestion when space is hit, will the sprite that is lit remain lit?

  • You should post a commented capx of your work, explaining what you, where you're blocked etc.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can post a capx on here? or do I need to host it some where?

    Again thanks for your help.

  • You asked the same question a few days ago and a lot of people helped you:

  • Dunno if you can attach a capx on your post (due to your low rep), but you can host it on a dropbox folder.

  • Nice one Joskin !

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