Community FAQ: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Coming Soon ==") |
No edit summary |
||
Line 1: | Line 1: | ||
== | ==== Is there a way to randomize values? ==== | ||
Yes. To randomize a value you use variable=RANDOM(0,100). For example<blockquote>HealPlayer=RANDOM(8,35) | |||
player heal $HealPlayer | |||
entity delete me | |||
map return</blockquote>This will use a local variable that will heal the player when collected for a random value between 8 and 35 health points. |
Revision as of 22:32, 13 August 2023
Is there a way to randomize values?
Yes. To randomize a value you use variable=RANDOM(0,100). For example
HealPlayer=RANDOM(8,35)
player heal $HealPlayer
entity delete me
map return
This will use a local variable that will heal the player when collected for a random value between 8 and 35 health points.