Solved Random-Number.

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Bapty

Member
Jan 25, 2021
13
0
1
17
Can someone help me? If I have a random number generated, what can I do so that it is not generated again?
 
Could you show your code?

In general if you use the line "a random number between _ and _" it will be a newly generated random number each time you get to that line. If you want to use the same random number for different purposes, you can save it as a variable: "set {_value} to a random number between _ and _" -> do whatever you want with {_value}. Let me know if that's not the question though.
 
I understand, my question is what can I do to prevent the random number (if it has been assigned) from being assigned again.
Could you show your code?

In general if you use the line "a random number between _ and _" it will be a newly generated random number each time you get to that line. If you want to use the same random number for different purposes, you can save it as a variable: "set {_value} to a random number between _ and _" -> do whatever you want with {_value}. Let me know if that's not the question though.
 
Status
Not open for further replies.