How do I make it so you have to do a specific task an amount of times before it gives you item?

I’m trying to make a city-like game where you have to go to “work” to earn money. What I want to do is make it so you have to push and hold down a button for a few seconds multiple times, then the item is granted. I already have it so you can press the button and it gives you 1 cash, but I want to make it so you must press and hold it 5 times before the item is granted. All suggestions/ideas appreciated! Thank you for reading!!

ok, so when u clickbutton, increment counter. then, put a target value on counter, once reach target, give money

4 Likes

First get

hmm, another aprouch.
counters and buttons are more begginer friendly than blocks and properties though

2 Likes

Hmm right but he wants it when the player completes a task

You way is still better.

1 Like

OHH yeah good point!
i think two counters will be better, but your way definently has its perks.,

Flaws…

This doesn’t give a rewind system…

Needless memory.


Here!
Button/Overlay → Increment Counter (Target number 5)
Counter (Target number reached) → Item Granter (Grant Item)
and
Counter (Target number reached) → Wire Repeater (Delay 0.1)
Wire Repeater → Reset counter

2 Likes

Wow! How do you get to the blocks? I haven’t been on for a while so I didn’t even know they added code LOL. I’ve been doing robotics for a couple years now and I’ve been coding on scratch for a while so that could be very helpful! Thanks :sweat_smile:

rewind?
wait i missed something…

Click on the device, and it’s a button in the top-left corner…

I just like to waste memory… Don’t judge me >:(

1 Like

First click on the Trigger Then click The blocks here is a helpful image

Reset system, sorry.

Notification devices have lower memory and have blocks.

1 Like

OHHHH It makes sense now- I wasn’t paying any attention to the wires LOL Thank you!!! :joy:

2 Likes

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.