[Tutorial] How to get a random number which is possible to be synchronized between the server and client side

Started by sumeshi0216 on

Topic category: User side tutorials

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Tutorial] How to get a random number which is possible to be synchronized between the server and client side
Fri, 08/04/2023 - 05:25 (edited)


This procedures is possible to get a random number which is be synchronized on the server and client side

- You will need to create a new global number variable "seed" 

- The resulting number is in the range 0 to 1

- When using a global number variable for the seed value, you should use this procedure on both the server and client side. Otherwise, the seed numbers will be out of sync and will not work properly

 

This is an example to get a random integer between 0 and 10. It is recommended to call a procedure and get random numbers

 

Download:

https://drive.google.com/file/d/1NNwkR3XW5nzicGnS7CSwIgCqpAWDsy5G/view?usp=drive_link

Edited by sumeshi0216 on Fri, 08/04/2023 - 05:25
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you
Fri, 08/04/2023 - 03:26

Thank you

Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you!
Tue, 06/18/2024 - 17:57

Thank you!

Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Why does this work?
Tue, 06/18/2024 - 17:57

Why does this work?