Increment on not Gadget
Posted: Sat Jun 10, 2023 3:20 am
Hi,
I am working on trying to create a simple game that can be showcased as "What is possible with the free edition of SpiderBasic". I am trying to increment the currency when the mouse is left-clicked, and it's not a gadget being clicked (ButtonGadget etc.). Here is the code I came up with:
However, the currency still increments when a ButtonGadget is clicked on. Any ideas?
Sincerely,
Cyber Spider
I am working on trying to create a simple game that can be showcased as "What is possible with the free edition of SpiderBasic". I am trying to increment the currency when the mouse is left-clicked, and it's not a gadget being clicked (ButtonGadget etc.). Here is the code I came up with:
Code: Select all
If Not Event() = #PB_Event_Gadget
currency()\value+1
SetGadgetText(currency()\handle,currency()\name + ": " + Str(currency()\value))
EndIf
Sincerely,
Cyber Spider