Can I use compound inequalities to spawn a number of npcs? Like 250>npc>100.
✓ ANSWER ACCEPTED
Can I use compound inequalities in lua?
1 answer
✓ Accepted answer
What you can do is use math.random() to get a random number between a range.
Just make a for loop and give it a random number between 100 and 250
for i=1,math.random(100,250) do
--spawn npc
--"i" is the current npc it is on
print("this is the "..i.." npc that was made")
end
3 comments
0
Wait, what do I put for the light blue text?
0
@rilgundam that was just an example, you want to spawn your npc inside the for loop
0
Oh ok thx.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Do you mean a random number between 100 and 250?
Yes
But the number is the number of npcs that spawn