Если вы хотите несколько воздушных шаров, было бы НАМНОГО проще использовать стол. Вы можете иметь столько шариков, сколько захотите, с минимальными усилиями.
Balloons = {} -- track all baloons
Function addBalloon(x,y,xVel,yVel)
Tab = {x = x, y = y, vel = {x = xVel, y = yVel}}
Table.insert(balloons,tab)
End
Function moveAllBalloons()
For_,i in pairs(balloons) do
i.x = i.x + i.vel.x
i.y = i.y + i.vel.y
End
End
Function isPlaying
For _,i in pairs(balloons)
If --[[mouse.x]] <= i.x - (balloon.width/2) and --[[other parameters here]] then
PlaySound
End
End
End
для разных сложностей, вы можете сделать что-то вроде
if L1 then
Num1 = math.random(3,15)
Num2 = math.random(3,15
OpFind = math.random(3)
If opfind == 1 then
Operation = "+"
Elseif opfind == 2 then
Operation = "-"
Elseif opfind ==3 then
Operation = "*"
End
ElseIf L2 then
num1 = math.random(7,50)
Num2 = math.random(7,50)
OpFind = math.random(4)
If opfind == 1 then
Operation = "^"
Elseif opfind == 2 then
Operation = "%"
Elseif opfind ==3 then
Operation = "*"
Elseif opfind == 4 then
Operation == "/"
End
End