Can you set the bullet speed for the sprite instance

Get help using Construct 2

Post » Sat Dec 06, 2014 5:59 pm

Hi

I have created a bullet sprite, and I spawn bullets, but on creation I change the speed of the bullet so they can have different speeds.

Howerver, it looks as if I am changing the speed for all bullets of the given class of sprite, and not the instance.

Is this true? Is the bullet behaviour properties "global" for all instances of the sprite?
B
5
S
1
Posts: 59
Reputation: 493

Post » Sat Dec 06, 2014 6:04 pm

Try to randomize the speed right before spawning the bullet...I think once created u can't change the speed I guess

it's like

1º bullet - set XX speed > Spawn bullet
2 ºBullet - set YY speed > Spawn bullet

the random expression is "random(x,y)". X and Y are the range of numbers that u randomly get
B
56
S
21
G
3
Posts: 602
Reputation: 6,612

Post » Sat Dec 06, 2014 6:08 pm

It looks as if you can change the speed of the bullet, but it change the speed of all bullets, or at least it looks that way.

So is it right that if you set the speed of the bullet, it will set the speed for alle visible instances of the bullet?

It can't be right? can it?
B
5
S
1
Posts: 59
Reputation: 493

Post » Sat Dec 06, 2014 6:25 pm

Do it and you will realize
Image

It changes speed's object instance only
B
56
S
21
G
3
Posts: 602
Reputation: 6,612

Post » Sat Dec 06, 2014 6:36 pm

Here is how i always done it

https://db.tt/twO44thH
B
9
S
5
Posts: 126
Reputation: 1,295

Post » Sat Dec 06, 2014 10:13 pm

Ok Thanks guys :-)
B
5
S
1
Posts: 59
Reputation: 493

Post » Sat Jun 24, 2017 7:07 pm

in a top down shooter, when a spite moves when in line of sight, set bullet speed to random(100,600) makes the sprite speed up and slow down. it doesn't set a constant speed.

is there a way to set a constant rate of speed within a range?
Play Ball Walker App Store | Google Play | Amazon
Image
B
30
S
5
Posts: 116
Reputation: 2,088


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests