Object blinking...

0 favourites
  • 6 posts
From the Asset Store
Full hyper-casual game with minimalist visual and procedural difficulty.
  • I know there's a behaviour to make this work but why its not working? Se the pic below:

    <img src="http://dl.dropbox.com/u/16702799/temp/BLink.PNG" border="0" />

    Its should blink...

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • "Stop Loop" just keeps another loop from being done, it doesn't stop at the current event.

    Try using "wait", it's much simpler.

    Every 1.0 seconds

    -objPushClick | Set Invisible

    -Wait 0.5 seconds

    -objPushClick | Set Visible

  • I did not know. I thought the "Stop loop" to end the loop at the time, even think it would be more correct, how it works in programming languages??.

    The wait command immediately ends the event?

    I think the loop should end because it makes it totally different than expected, and makes people experienced in other languages ??do dumb questions like I did ..

    Thanks for the help.

  • 'Repeat 1 times' does nothing, events run once normally anyway!

    Follow the logic of the events:

    Is sprite invisible?

    • yes, set it visible
    • stop loop does nothing since the current iteration will finish anyway

    Is sprite visible?

    • yes, we just set it visible in the last event
    • set it invisible again

    End result: nothing happens, the object is set visible then invisible immediately after.

    Why not use the Flash behavior anyway?!

  • I think you did not understand my reasoning. The use of the loop was only to address the lack of an "else". See this example on a hypothetical programming language:

    repeat (1)
        if (visible) then
            visible = false
           break; / / here I get out of the loop to not run the second test
                       / / is like a goto the end of the loop
                      / / else it because we have not
       if (not visible) then
           visible = true

    See what I was saying?

    Btw, the problem was solved.

  • Yeah, I guess the issue is 'stop loop' is different to 'break'. 'stop loop' finishes the current iteration.

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