Help me find the error in this tiny ultra small project !

0 favourites
  • 5 posts
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • Hello,

    Sorry, I'm a C3 newbie.

    I cannot understand the error in my (attached) projet.

    I've got a Sprite that is perpetually falling.

    When you touch/click on the upper right box, it toggles a "Pause" boolean, and should stop (or restart) the falling movement of the Sprite.

    But instead of "falling" (from top to bottom), the Sprite that has been paused and restarted, goes to the right. I cannot see why...

    Thanks for helping !

    You can download the C3P project here:

    framadrop.org/r/oLTlrvqxJH

  • When you change Bullet speed to 0, bullet angle of motion is also reset to 0. So when you you set speed back to 500, the sprite moves at angle 0, which is to the right.

    You need to set angle of motion to 90 degrees in event 2.

  • Thanks dop2000

    Before posting, I tried to set angle to 90, but not "angle of motion" :-)

    So, is it some kind of a bug, that when setting speed, it also resets the angle ?

  • It is indicated in the Bullet behavior's manual article :

    Set angle of motion

    Set the angle the bullet is currently moving at, in degrees. Note: when the speed is 0, the angle of motion is always 0 and cannot be changed, since there is no motion. Therefore setting the angle of motion then the speed does not work if the object is stopped. Instead, set the speed first and then the angle of motion.

    No motion, no angle of motion, speed must be set first.

    When the speed is set to 0, there is no more angle of motion.

    -> Sprite: Set Bullet speed to Pause ? 0 : 500

    -> Sprite: Set Bullet angle of motion to 90 degrees

    Does the job of keeping the sprite moving toward the bottom.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks Kyatric and dop2000

    Was not expecting such ultra fast answers to my questions.

    The C3 community looks great !

    I'll consider sharing 50% of my future game income to the community :-)

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