a bug? Bullet speed not increasing

Get help using Construct 2

Post » Wed Jul 06, 2016 2:53 pm

i made a poweup for the game im making so that when the player collides with it, it increases the bullet speed (Super Ammo). then destroys itself

it destroys itself but the bullets are not coming out faster.

why is this?
B
7
S
2
Posts: 105
Reputation: 889

Post » Wed Jul 06, 2016 2:57 pm

Impossible to say without either seeing your code or a .capx - there's no way for us to know how you have set it up.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,492
Reputation: 60,270

Post » Wed Jul 06, 2016 3:49 pm

Have you set the acceleration to increase / decrease properly?
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Wed Jul 06, 2016 5:22 pm

Image
B
7
S
2
Posts: 105
Reputation: 889

Post » Thu Jul 07, 2016 2:52 pm

anyone?
B
7
S
2
Posts: 105
Reputation: 889

Post » Thu Jul 07, 2016 3:10 pm

Just to be clear, that will only increase the speed of bullets that exist at that time. It won't affect future bullets. You'd need a global to manage that.
ImageImageImage
B
71
S
22
G
249
Posts: 3,762
Reputation: 138,575

Post » Fri Jul 08, 2016 9:46 am

GLOBALVARIABLEBULLETSPEED = 100

bullet on created : set speed to GLOBALVARIABLEBULLETSPEED
player on collision SUPERAMMO : set GLOBALVARIABLEBULLETSPEED to 200
B
19
S
5
Posts: 104
Reputation: 1,761

Post » Fri Jul 08, 2016 1:41 pm

manukeo wrote:GLOBALVARIABLEBULLETSPEED = 100

bullet on created : set speed to GLOBALVARIABLEBULLETSPEED
player on collision SUPERAMMO : set GLOBALVARIABLEBULLETSPEED to 200


This worked! Thank you!

is their a list of global Vars that i can see that are used within construct 2?
B
7
S
2
Posts: 105
Reputation: 889

Post » Sat Jul 09, 2016 3:19 am

You can use a global variable pretty much anytime you can type a number in the events mode. You can name the variables anything you want as long as construct isn't already using that name for something else. The above example would work if you used the name superCat. This would make it difficult to remember what it did, though.

It will also be important to reset the variable when you are done with the level or your bullets will always be speed 200.
Broomstick Delivery Feedback wanted
https://melaniko.itch.io/broomstick-delivery works best with Chrome
B
12
S
5
G
2
Posts: 22
Reputation: 1,992

Post » Sat Jul 09, 2016 8:35 am

melaniko wrote:You can use a global variable pretty much anytime you can type a number in the events mode. You can name the variables anything you want as long as construct isn't already using that name for something else. The above example would work if you used the name superCat. This would make it difficult to remember what it did, though.

It will also be important to reset the variable when you are done with the level or your bullets will always be speed 200.


but then how would construct no what im talking about is i just named any random variable? EG if i said variableExp.

How would construct no im talking about the EXP or points without it being somehow linked to that object ect
B
7
S
2
Posts: 105
Reputation: 889

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests