godot random choice

Phin236Phin236 Posts: 13Member

hi guys!
as the title how to achieve random choice in godot engine
:#

Best Answer

  • TwistedTwiglegTwistedTwigleg Posts: 1,498
    Accepted Answer

    You use can use randi and randf to get random values. You can use randomize() to get a random seed for the random generator. I think there is also a random range function, though I don't remember what it's name is.

    Here's the docs page that shows some of the random functions (Godot 2.1 docs)

Answers

  • TwistedTwiglegTwistedTwigleg Posts: 1,498Admin
    Accepted Answer

    You use can use randi and randf to get random values. You can use randomize() to get a random seed for the random generator. I think there is also a random range function, though I don't remember what it's name is.

    Here's the docs page that shows some of the random functions (Godot 2.1 docs)

  • Phin236Phin236 Posts: 13Member

    got it thanks <3

Sign In or Register to comment.