How do I make constant speed???

Get help using Construct 2

Post » Sun Oct 15, 2017 4:42 pm

Try this. In your original example, slow the bullets to 200. You'll see what happens.
It's the same thing. The flames are drawing on top of each other as you go forward and farther apart as you go backwards.

Think of it. If you had a flame throw and sprayed in front of you. If you ran forward, you would get burned - the flames are still in the air in front of you. They don't move forward just because you did.
ImageImageImage
B
71
S
22
G
273
Posts: 3,822
Reputation: 150,787

Post » Sun Oct 15, 2017 5:12 pm

To get the effect you want, then, means you either need to just animate what you want, and the animation would play pinned in front of the player, or you would need move the bulllets relative the the player (on top of the bullet's movement), so they stay in the same relative position, as the player moves around.
ImageImageImage
B
71
S
22
G
273
Posts: 3,822
Reputation: 150,787

Post » Sun Oct 15, 2017 6:04 pm

blackhornet wrote:or you would need move the bulllets relative the the player (on top of the bullet's movement), so they stay in the same relative position, as the player moves around.

sorry but I also have some problems with understanding English, could you explain this step better?
B
19
S
8
G
8
Posts: 595
Reputation: 6,915

Post » Sun Oct 15, 2017 6:21 pm

http://www.blackhornettechnologies.com/Construct2Stuff/nn81_strange_speed_BHT.capx
You need to calculate the delta from the player's position. So store the last X and then move the bullets by the same amount. May not look right in the sample, but try it with your flames.
ImageImageImage
B
71
S
22
G
273
Posts: 3,822
Reputation: 150,787

Post » Sun Oct 15, 2017 6:41 pm

blackhornet wrote:http://www.blackhornettechnologies.com/Construct2Stuff/nn81_strange_speed_BHT.capx
You need to calculate the delta from the player's position. So store the last X and then move the bullets by the same amount. May not look right in the sample, but try it with your flames.

I tried the capx but bullets movements now are crazy :shock:
B
19
S
8
G
8
Posts: 595
Reputation: 6,915

Post » Sun Oct 15, 2017 7:04 pm

Hey @NN81,

Here you go. This is basically what @dop2000 mentioned earlier.

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

I increased the width of the layout so you have more room to actually see the shots. Also, I'm destroying the bullets when they travel at least the minimum distance between bullets outside of the layout. Because we need the last bullet to be alive in order to calculate when to spawn the new one.

Hope this helps. Cheers!
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
22
S
6
G
3
Posts: 717
Reputation: 3,996

Post » Sun Oct 15, 2017 8:07 pm

brunopalermo wrote:Hey @NN81,

Here you go. This is basically what @dop2000 mentioned earlier.

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

I increased the width of the layout so you have more room to actually see the shots. Also, I'm destroying the bullets when they travel at least the minimum distance between bullets outside of the layout. Because we need the last bullet to be alive in order to calculate when to spawn the new one.

Hope this helps. Cheers!

thank you but nothing to do, maybe I'm having trouble viewing .. but none of the proposals at the moment give me the effect I would like.
maybe @R0J0hound can understand me?
B
19
S
8
G
8
Posts: 595
Reputation: 6,915

Post » Sun Oct 15, 2017 9:08 pm

I said they wouldn't look right in the sample. Did you try the mechanism in your game?
ImageImageImage
B
71
S
22
G
273
Posts: 3,822
Reputation: 150,787

Post » Sun Oct 15, 2017 11:00 pm

Then, I guess we're not getting what you want.

I thought you needed the bullets to come out equally spaced, no matter if you're moving left, right or not moving at all. That is what my example does. If it's not what you're looking for, it would be nice if you could explain better, then... :)
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
22
S
6
G
3
Posts: 717
Reputation: 3,996

Post » Sun Oct 15, 2017 11:36 pm

ImageImageImage
B
71
S
22
G
273
Posts: 3,822
Reputation: 150,787

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests