How do I switch the switch

0 favourites
  • 3 posts
From the Asset Store
Toggles Dials Switches and Alerts ! A foundational sound grouping of Analog type switches and Steampunk effects
  • Dear Friends,

    Sometimes it looks if I am blind for some problems,

    I can't see what I am doing wrong.

    Could anybody please explain why this does not work?

    And please tell me how to solve this?

    I made a switch that one can turn in 3 positions

    Position 0 = 0 degrees

    Position 1 = -60 degrees

    Position 2 = +60 degrees

    I tried two methods, but neither of them will function.

    I guess this is a simple mistake I made, but I can't find the proper way to turn the switch.

    Frustrating...

    Thanks in advance for your help.

    [attachment=0:kvk9ywlc][/attachment:kvk9ywlc]

    [attachment=1:kvk9ywlc][/attachment:kvk9ywlc]

  • Don't stack the logic like that. Your first test should be: Left-clicked. From there use sub-events to break down the next steps for 0 Else -60 Else 60.

    If you step through what it's doing you see what is wrong. (Method2.PNG won't work as you are changing frames but testing angles - you didn't change the angle). Method1.PNG: When the events run, "Left-clicked is True *for all cases*. So, event 4 checks the angle is 0, then sets it to -60. Then event 5 runs and the angle is -60, so it sets it to 60, then event 6 runs and sets it to 0!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks a lot blackhornet.

    That's completely different from what I did!

    Now I understand what I did wrong.

    The capx file was very helpfull, without I could'nt understand.

    I hope once I have your level and will be able to help beginners like me.

    Great, Thanks again, also for the quick reply!

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