This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote

Hi, maybe someone can help me with this, i have a scene where a random number is generated, this number is the time when an animation has to start, this start has to be random.

Works ok but, when i instance this scene (A) inside my main scene (B), and A is duplicated, the result, should be that all the A has a different start. But all the animations start at the same time.

  • B

    • A
    • A
    • A

How can i get each A start randomly at different time?


in Engine by (23 points)

1 Answer

+1 vote
Best answer

I guess your random number script is somewhere in scene A. I would call function randomize() inside callback _enter_tree(). Every time the instance of scene A enters the tree, your seed should be reseted.

by (836 points)
selected by

That worked, Thanks!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.