Dead Stop

This forum is currently in read-only mode.
  • I am using a custom movement, but is there a way to tell if my sprite had drifted to a dead stop after I stop? When I let go of the power it is still gliding.

    I want my ship to refuel over a sprite only if it is stopped.

  • That depends on how your movement is setup. Would you mind posting a CAP?

  • That depends on how your movement is setup. Would you mind posting a CAP?

    Here is an early (lame) verion while I was testing shields. but it has the movement.

  • Check the X and Y velocities from the physics behavior's expressions using the "Compare" condition in the system object. If both are equal to 0, your object has stopped completely.

    However, it will take a little while for your ship to actually stop completely, even if it looks like it has done so. You could make it less picky by flooring the velocity values divided by ten, like so:

    floor(VelocityX / 10)

    I hope this helps.

  • I hope this helps.

    I understand the concept but making Construct do it is another matter.

    So I have to be over my refuel sprite, and compare both X and Y velocities. Hum....

    Sometimes just code owuld be easier. LOL

    I have to think about this, I am missing something,

  • Here's an example of it in action:


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was looking for a linking word to join the X & Y you just put both blocks together!

    Great example I leaned alot about construct with that. THANKS!

  • Hmmm. Cool.

    I have to recommend, given on how this thing works, that the player would be given a deadstop button. Took a bit too much clicking around to get that ship to a dead spot over refuel.

  • Nooo This is perfect for what I needed. linkman2004 knew what I wanted and delivered!

    If I wanted a dead stop button all I had to do was make my ship with less coast or just run over the spot.

  • Oh well. I'm assuming it a precision based exploration game... Am I right?

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