random number

leafeonfan32
23 Feb 2021, 01:55

i want to make a random number generator that always chooses a number but the number is random


D4r4dragon
23 Feb 2021, 04:02
Value = GetRandomInt (1,10)

with Value being your variable name.


jmnevil54
23 Feb 2021, 04:26

And then, after following d4r4dragon's advice, you can do this:

msg (Value)

leafeonfan32
23 Feb 2021, 05:24

how can i get a certain number to affect the player


jmnevil54
23 Feb 2021, 10:04

I'm not sure what you're doing here but I assume it's Hit Points related...

player.hitpoints =  player.hit points - Value