How to change movement angles of behaviors

Get help using Construct 2

Post » Sat Oct 05, 2013 4:00 am

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.tamernator2013-10-05 06:02:56
B
5
S
2
Posts: 12
Reputation: 499

Post » Sat Oct 05, 2013 2:19 pm

Is it that much difficult that nobody knows ?
B
5
S
2
Posts: 12
Reputation: 499

Post » Sat Oct 05, 2013 3:16 pm

This sounds like the Car behaviour.
ImageImageImage
B
71
S
21
G
231
Posts: 3,688
Reputation: 129,352

Post » Sat Oct 05, 2013 3:54 pm

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.
B
18
S
4
G
1
Posts: 332
Reputation: 3,149

Post » Sat Oct 05, 2013 4:10 pm

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.
B
5
S
2
Posts: 12
Reputation: 499

Post » Sat Oct 05, 2013 4:15 pm

Do you mean the Asteroids movement?

tutorial
ImageImageImage
B
71
S
21
G
231
Posts: 3,688
Reputation: 129,352

Post » Sat Oct 05, 2013 4:24 pm

[QUOTE=blackhornet] Do you mean the Asteroids movement?

https://www.scirra.com/tutorials/358/asteroid-clone-in-less-than-100-events/page-1[/QUOTE]
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 movementtamernator2013-10-05 17:04:05
B
5
S
2
Posts: 12
Reputation: 499


Return to How do I....?

Who is online

Users browsing this forum: tarek2, Yahoo [Bot] and 14 guests