if Slider[3].stop ~= 1 then
for k,v in ipairs(Slider[3]) do
if v.y > -500 and v.y < 10 and spinTimer <= Slider[3].spinTime then
Slider[3].lastID = k
end
if Slider[3][Slider[3].lastID].y <= 300-GameSpeed then
v.y = v.y + GameSpeed
elseif spinTimer >= Slider[3].spinTime then
Slider[3].stop = 1
love.audio.stop(sounds[11])
love.audio.play(sounds[11])
if Slider[3].multiplaySymbol == 1 then
love.audio.stop(sounds[17])
love.audio.play(sounds[17])
end
end
if v.y > 638 then
v.y = v.y - GameSizeY*5
v.item = getRandom(3)
end
end
I see ... if I understand your code correctly it probably is because you move the symbols y position by the value of GameSpeed and at some point reset this position by subtracting 5*GameSizeY which results in different stopped y positions if 5*GameSizeY is not an exact multiple of GameSpeed.
You could either fix the positions when you stopp the symbols or reset them to a fixed position instead of a relative reset, i.e. v.y = GameSizeY*5 or whatever is the correct position.
Nelvin wrote: ↑Tue Jan 01, 2019 2:00 pm
I see ... if I understand your code correctly it probably is because you move the symbols y position by the value of GameSpeed and at some point reset this position by subtracting 5*GameSizeY which results in different stopped y positions if 5*GameSizeY is not an exact multiple of GameSpeed.
You could either fix the positions when you stopp the symbols or reset them to a fixed position instead of a relative reset, i.e. v.y = GameSizeY*5 or whatever is the correct position.