How do I Accelerate using Custom Movement consistently?

0 favourites
  • 3 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • Hello all! :]]

    I'm having trouble with the "accelerate towards angle" action. It seams that it doesn't work if used on an object created in the same tick.

    Also. It seams that accelerating objects is somewhat random.

    I included a simple capx if someone would be so kind as to attempt to help me sort this out.

    https://www.dropbox.com/s/dcus6r4d9ev05 ... .capx?dl=0

    Background:

    I'm making an "asteroid"-type game where you (a sprite with an animation of a space ship) is situated in the middle of the screen.

    When you press arrow keys to move, you stand still, but everything else moves around you.

    I have made my own movement for the ship. But moving diagonally makes the universe around you move only 0.5y and 0.5 x for every 1x/y you would move straight horizontally or vertically, making the movement not realistic, as a diagonal move would move you something like 0.75 in x and y in reality.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Why do you use accelerate in a triggered event?

    Wouldn't setting the speed to something different be better when only done once?

    I think accelerating would work better if done for a certain amount of time..

  • Thanks for replying!

    "Why do you use accelerate in a triggered event?"

    Hmm. I hadn't thought about that. I don't in my actual game.( I made the capx to illustrate the inconsistency of using the accelerate). So, accelerate can't be used to "set" the speed of an object, without having it act up?

    If this is how it works. I guess I'll just have to make a mental note not to use triggers with accelerate.

    "Wouldn't setting the speed to something different be better when only done once?"

    Well. I wan't to make it so that I can accelerate every other object every tick according to an instance variable of another object, which I then reset. I have in these 24 h realizes that simply isn't the best way to do it. I now have the game setting the speed of all other objects to another object every tick, and having that object accelerate instead.

    I think accelerating would work better if done for a certain amount of time..

    Yes. It seams to work if using lower values over more ticks. I can't help but feel that it's still not consistent, and that bothers me...

    Ah well. I think I have solved my problem though. Even If my questions still aren't resolved.

    I thank you for taking the time to read, looking at the .capx and replying!

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