Why this simple event doesn't work?

0 favourites
  • 5 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I have a sprite, with rotation behavior, and 2 event on the project that's all.

    just wanna rotate this red object :

    his speed is set:

    event are set:

    here is what's happen.

    on start of preview, works well, the red object rotate on clockwise, then I click button and he invert his rotation, untill now, is ok.

    then I click back on a, and object don't rotate. I checked debug, his speed change once, first rotation works, then can't rorate back, still same speed

  • Replace the second condition "If Speed=-52" with "Else":

    If Speed=52 ......
    
    Else ......
    
    
  • Replace the second condition "If Speed=-52" with "Else":

    > 
    If Speed=52 ......
    
    Else ......
    
    

    that does not work. still same

  • It doesn't work because the Speed variable doesn't become -52 when you hit A, you're just telling it to set the behavior speed to Speed 2

    Delete the variable speed and speed2, On A Pessed set rotate speed to:

    -self.rotate.speed

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It doesn't work because the Speed variable doesn't become -52 when you hit A, you're just telling it to set the behavior speed to Speed 2

    Delete the variable speed and speed2, On A Pessed set rotate speed to:

    -self.rotate.speed

    wooo that's working thank you!

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