Change speed bullet generated by spacecraft when I pickup an object

Hi guys,
I started using this engine a few days ago.
In the game that I am developing the spacecraft generates one bullet with speed 300*TimeDelta().

I would like every time that the spacecraft collides with an object (powerup) the speed of the bullet increases of 100 or 200 ect. Could you show me how do you do? Thank you in advance.

Use a scene or global variable to keep track of bullet speed. Add an instance variable (say called speed) to the bullet object to store its velocity when you create the bullet. Use that variable when you update the bullet’s position - Bullet.Variable(speed) * TimeDelta()

But the speed variable, what kind of variable is?

A number. The event’s condition & action word Variable refers to a number. VariableString refers to text.

Show me please some screenshots.
I did so:
1)I created a global variable in Global Variables: name Bulletspeed with number 300 because at the beginning of the game I want the bullets go to 300 * Timedelta() as default

2) I created for bullet an istance variable with name Speed number 300

3) And I want that every time the ship in collision with powerup the bullet increase of 300 (300, 600, 900 ect)

I tried as you wrote but it does not work. Maybe I did wrong something. Maybe has I to put the global variable bulletspeed to the beginning of the scene? I don’t know.

Variables are case sensitive. That means Speed with an uppercase ‘S’ is different to speed with a lowercase ‘s’.



@MrMen I fixed the error but the bullet goes to the same speed.

In the beginning of the scene create a scene variable called BulletSpeed. Set the value of BulletSpeed to 300 or whatever you want it to be.

Then you have a permanent action (like your first screenshot) where you have defined the speed of your bullet, change it to Variable(BulletSpeed)*TimeDelta().

Whenever your spacecraft collides with a powerup, change the scene variable by adding 100, use trigger once for it, and make sure the powerup is deleted.

Set the bullet’s Speed variable to the global variable BulletSpeed when you create the bullet.

This event

needs the 300 * TimeDelta replaced with Bullet.Variable(Speed) * TimeDelta()