Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Newby |
I want to have my enemy to have random stats like strength, defense,etc how do i do it
i know about randi() function but i want to use just one randi for all stats how do i make it so that the stats are each different.
Not sure what you mean by “one randi for all stats”, randi()
is a function, it will return the next random number in sequence. Can you explain what you mean by wanting one randi for all stats?
pgregory | 2018-03-04 09:50
somthing coded like this
var rand1=randi()%amount
var rand2=randi()%amount
var rand3=randi()%amount
var rand4=randi()%amount
ect..
STR=rand1
DEF=rand2
MAG=rand3
RES=rand4
etc...
it just seem big to me and there is probably a simpler solution than this
Newby | 2018-03-04 10:49