Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | rodell2020 |
I am trying to create a 2D Super Mario platform like game
I managed to create my own bricks and make them bust and do random coins
but Now what I like to do is
[A] at random if he breaks a brick it grows a flower on top so that the Player walks into the flower he grows…
[B] at random if he breaks a brick it sends a mushroom out (moving) the player has to chase it. if he catches it he gets (I do not know yet but I wanted to get ahead start here!
look
Random number generation — Godot Engine (stable) documentation in English
var random = RandomNumberGenerator.new()
var number : int
func _ready():
random.randomize()
number = random.randi()% 2
print(number)
pass
func example():
if number == 0:
print("flower")
else:
print("mushroom")
ramazan | 2022-07-12 07:45