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()
@MrMen
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
@MrMen
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.
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.