How do I Accelerate using Custom Movement consistently?

Get help using Construct 2

Post » Tue May 12, 2015 6:19 pm

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.
B
6
S
2
G
2
Posts: 33
Reputation: 891

Post » Tue May 12, 2015 6:53 pm

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 13, 2015 10:40 pm

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!
B
6
S
2
G
2
Posts: 33
Reputation: 891


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests