How would I make it so a click to interact event only happens once?

Hi! I’m currently having some trouble with my game. I want to make it so when I click it takes me to the main game, but I also want to make it so the event only happens once (the clicking). I would also greatly appreciate it if someone could help me make it so you would have to click on the actual “start” sprite to enter the game. Thank you! :smiley:

https://arcade.makecode.com/S51530-32793-44945-94850

if anything is unclear please ask! I tried to include all relevant information :frowning:

xtra: i used a browser events extension

5 Likes

Welcome to the forums @june! I will help you. Just let me get home. @WoofWoof I got this one :smiley:

1 Like

make a variable for it. add if variable or “variable”=“number or string” then for the event that happen ones chang the variable so it won’t happen again.

2 Likes

i was gonna say that lol

3 Likes

There’s something called booleans…


Use a variable that is set to false on startup, once that action is done change it to true.

Make sure the “if” block is in place so we can make the code run if it equals false.

2 Likes