![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | FullGlove |
Hey guys I was looking for help on this upgrade system in a Clicker game I’m making.
Here’s the code for the upgrade which is a system to increase the CPS Level of the upgrade and increase the price of the upgrade.
Note: CPS(CrystalsPerSecond)
func _on_TextureButton2_button_down():
if Global.Crystals >= Global.shop2+1*30:
Global.shop2 += 3
Global.CrystalsperSecond += 3
Global.Crystals -= Global.shop2 + 1*10
$ScrollContainer/VBoxContainer/TextureRect2/Level2.text = str(Global.shop2)
$ScrollContainer/VBoxContainer/TextureRect2/Price2.text = str(Global.shop2+3*10)
else:
print("Not yet sir")
I would like to increase the price exponentially but the CPS Level consistently.
Thanks for the help.