Tip For my incremental game
the current issue I'm having is only 1 button will show up when I have the correct code for 2 buttons
the current issue I'm having is only 1 button will show up when I have the correct code for 2 buttons
yes but idk how to add that button to my list I already have 1
dude it worked perfectly thx
ok both buttons show up but now only 1 works and they are both in a list
its telling me that "checkRectMouseHover = function() is not a function even tho I declared it a function in a different file
BaseBoost = 0
MultiBoost = 1
ExpondentalBoost = 1
Point_Gain = (((1 + BaseBoost) * MultiBoost) ^ ExpondentalBoost)
//Upgrade button
buttons = []
buttons.push(
button = object
x = 175
y = 75
width = 45
height = 45
text = "Points Upgrades"
action = function() print("success") end
scale = 1
alpha = 4
end
)
for button in buttons
//check hover
button.scale = 1
if checkRectMouseHover(button.x, button.y, button.width, button.height) then
button.alpha = 1
if mouse.press then
button.action()
end
if mouse.pressed then
button.scale = 1.1
end
else
button.alpha = 0.7
end
end
draw = function()
// set up the game
screen.clear()
screen.fillRect(0, 0, 400, 400, "rgb(142,217,255")
screen.setFont("RetroGaming")
// draw the Points
screen.drawText("Points: " + Points, -125,85,15 "rgb(0,0,0)")
for button in buttons
screen.setDrawScale(button.scale, button.scale)
screen.setAlpha(button.alpha)
screen.fillRoundRect(button.x-100, button.y-10,
button.width+50, button.height+50,"rgb(255,255,255)")
screen.drawSprite("point_upgrades", 175, 75, 45, 45)
screen.drawText(button.text, button.x-100, button.y-10)
screen.setDrawScale(1, 1)
screen.setAlpha(1)
end```
I went afk I thought you were not going to reply until tomarrow
and they are for each button
ok
main values like the variables that are declared?
ok we got Points, Points_Gain, SavedData, hover, BaseBoost, MultiBoost, ExpondentalBoost, frameCount, draw function, buttons list, init function, save game function, update function, and chechRectMouseHover function
uhhhhh? I went afk and I came back and the point system is gone?
I'm sorry if I bothered you too much