Do While Not Loop

0 favourites
  • 4 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hey there. I've been trying to make a loop to make something work, and I would like it to stop when X key is pressed.

    So I was thinking it could work like:

    Do While Not (key is down):

    ---stuff I want done goes here

    endOfLoop

    But so far I've been unsucessful on my attempts.

    Here's a screenshot of the last one, maybe someone could give me a hand.

    Thanks in advance.

    <img src="http://imageshack.us/a/img690/1530/whilenot.png" border="0" />

  • You should probably redo the events in terms of trigger-based rather then a while-not loop.

    For example, you can set the text_start to be blinking at default as you did on your example, and only hide it when the key is pressed in another event.

  • You should probably redo the events in terms of trigger-based rather then a while-not loop.

    For example, you can set the text_start to be blinking at default as you did on your example, and only hide it when the key is pressed in another event.

    I don't want to hide it. The image is supposed to be fading out and then fading in (Not all the instructions are shown in the screen, since they-re just the same thing).

    I need it to do it and not stop until a key is pressed.

    I hope that clears it. Thanks again.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your event does not make much sense, it says:

    On start of layout: repeat forever while space is not down: <actions>

    Since the status of whether space is down or not only updates at the end of a tick, this will most likely loop forever and hang the app.

    Maybe you just need to use 'On key released'?

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