Question regarding the acceleration and deceleration of an actor that is rotating.

Hi all,

I was wondering if any one could help me. While trying to solve two problems I've been driven slowly insane. I would be eternally grateful for any help.

https://www.dropbox.com/sc/e2oub7h2u33dunx/r8gbrHVVCU

I have an actor (a spaceship) which rotates around a planet, Clockwise when UP is pressed and Counter-Clockwise when DOWN is pressed. The spaceship actor is constrained to an invisible actor at the centre of the screen (and of the rotation) behind the planet which controls the movement of the ship actor. What I would like is for the movement of the ship in rotation to accelerate and decelerate. For example when the up key is pressed I would like the Actor to Accelerate in it's rotation until it reaches a certain speed, if the up key were to be let go of however it would then slow to being stationary. This would achieve a floating sense of momentum for the ship actor which I feel is essential.

My second problem revolves around the nature of the enemy ships (the three yellow objects in the image). These ships rotate constrained to (and at varying distances from) their own personal actors in the centre in the same way as the Player Ship, however I would like to work out a way where the ships would change the direction of their rotation randomly. For example say the enemy ship were to be rotating counter-clockwise firing I would like it so that it would then randomly shift to start rotating counter-clockwise. I'm working on this as a base and have laid plans for increasing the difficulty and variety in the gameplay but feel solving these two problems are essential to the game being enjoyable to play.

If there is anything you would like to know please just ask as it possible I have left out some key information somewhere.

Thank you for your time.

Best Answer

Answers

  • Thank you. Here's hoping, I'll read a bit about what they all are capable of and see how it can all work together.
  • Got it working, so much simpler than I would have thought. I had been playing with timers but without first plainly figuring out what it was I required so got no where. I'm going to copy out instructions of how to do it when I next get the chance, while I'm sure it's quite simple to those more familiar with game salad I feel that there will be others at a basic level like myself who might benefit. Thank you very much for your help.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Any Time. Its great to see people figuring out new things with GameSalad
  • joshiwujoshiwu Member Posts: 207
    Don't forget to change the drag to something low like .1
Sign In or Register to comment.