B
Boom
Guest
The title is confusing but I don't know how else to describe it.
I will try my best to simplify with this analogy
For example, I have a bullet. I want to make it go a range of different speeds without having to make each speed its own object.
My plan is to find a way to change the variable when it created but I don't know how to do it.
Using a global variable like this will work:
I will try my best to simplify with this analogy
For example, I have a bullet. I want to make it go a range of different speeds without having to make each speed its own object.
My plan is to find a way to change the variable when it created but I don't know how to do it.
Using a global variable like this will work:
Summoner's step event
global.speed = 0
instance_create_layer(x,y,"Instances",bullet)
global.speed = 3
instance_create_layer(x,y,"Instances",bullet)
global.speed = 5
instance_create_layer(x,y,"Instances",bullet)
Bullet's creation event
placeholder_speed = global.speed
but this feels like a very roundabout way of doing it. Is there a simpler or cleaner way of doing this?Bullet's step event
x += placeholder_speed