Magictibiaman
New Member
- Joined
- May 25, 2009
- Messages
- 371
- Reaction score
- 0
Randomizing Arena Spikes
what can i use so in the arena spikes are randomly created.
between the coordinates 100,200,7 to 120, 220,7
which is about 400 squares i don't want to manuanlly code each square,
which is something easier?
can i use a for loop?
CODE------
spike1 = {x=100, y=200, z=7, stackpos=1}
if math.random(0, 1) == 1 then
doCreateItem(4995,1,wall1)
else
doRemoveItem(getspike1.uid,1)
end
---------
see and i need to do this for all 400 squares
what can i use so in the arena spikes are randomly created.
between the coordinates 100,200,7 to 120, 220,7
which is about 400 squares i don't want to manuanlly code each square,
which is something easier?
can i use a for loop?
CODE------
spike1 = {x=100, y=200, z=7, stackpos=1}
if math.random(0, 1) == 1 then
doCreateItem(4995,1,wall1)
else
doRemoveItem(getspike1.uid,1)
end
---------
see and i need to do this for all 400 squares