So i tried to make an clickpower variable on my game.
I tried making these:
clickpower = 1
And the part where you buy an upgrade and increase your clickpower by 1.
if upgbutton.collidepoint(pos):
if puan >= 10:
upgbutton.pos = (744,80)
animate(upgbutton, tween= "bounce_end", duration = 1, x = 744, y = 100)
clickpower + 1
puan - 10
else:
upgbutton.pos = (734,80)
animate(upgbutton, tween= "accel_decel", duration = 0.3, x = 744, y = 100)
Also these codes except click power is in
def on_mouse_down(button,pos):
global puan, clickpower
if button == mouse.LEFT:
I tried increasing the clickpower in a condition. Making the upgrade button have a condition to press, and that is having 10+ points(or exactly 10)
But when i click the upgrade button with the having 10+ points, it doesnt increase my clickpower. can someone fix or change the code i wrote?