How to change movement angles of behaviors

0 favourites
  • 7 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • Hi guys, sorry for my bad English.Though im new in Construct i alredy want to make space ship game but the problem im facing is,the movement for it.Movement i need is 8Direction, but instead of screen directions(like it works normally)it should move the ship at angle relatively to the main character(ship), that player is going to operate with.

    For example when i press "UP arrow" it should go forward to the direction of the ships frontside(nose) and not to the UP of my screen.

    Yes i can make that movement with Condition "if UP arrow is pressed" > Action Space Ship > Position&Size Move to Angle and then choose my ships angle but its not what i want becasue then my ship does not have acceleration and Deceleration.I think Devs should apply that option into action for 8Direction behavior.

    I tried to do with custom Behavior, choosing Action > accelerate to the angle of spaceship angle but then acceleration increases my spaceship speed forever and i do not find any way to put in function deceleration by using custom behavior.

    I will appreciate any help from you guys.

  • Is it that much difficult that nobody knows ?

  • This sounds like the Car behaviour.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Most of the time you get to have to write your own movement controls, however what you describe really sounds like a car behaviour. At the worst case, you can modify the bullet behaviour to work as what you want, but it would take some work.

  • Car behavior is not exacly what i need.When i use Car behavior it changes its direction of speed when i rotate my ship and its not what i need, My ships direction/vector/trajectory should stay the same no matter how i turn my ship until ofcourse i press "forward" key again after i did turn my ship alredy.

  • Do you mean the Asteroids movement?

    tutorial

  • Do you mean the Asteroids movement?

    https://www.scirra.com/tutorials/358/asteroid-clone-in-less-than-100-events/page-1

    I think its what i need, not sure yet since i need to test it how it works with gravitation, because i can do alredy the same with using custom movement acceleration and rotation , but the problem is that gravitation never stops ships movement to up side , even though i released movement key long ago. With other words i need gravitation to work like deceleration for vertical up side movement.

    But i think i can modificate events from that game, and make deceleration automatically after every 0.2 sec for example instead of pressing "down arrow".

    And 1 more thing, it would be really good if someone told a way to make rotation also with acceleration and deceleration, like movement

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