![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | blackmumba |
![]() |
Old Version | Published before Godot 3 was released. |
Because when enemies die I want them to reborn within rectangle
Sorry for my bad english
What kind of object is the rectangle?
DodoIta | 2018-01-08 22:19
Thank you for your anwser.
Just like a window. Sorry i don’t know what kind of this rectangle called in english
but i have got an idea
just put position2d node to the top left corner and bottom right corner
and then get global position of them and random between position x and y of 2 node
var random_x = rand_range(position1.x,position2.x)
var random_y = rand_range(position1.y,position2.y)
enemies.set_global_pos(Vector2(random_x,random_y))
blackmumba | 2018-01-08 23:29