Block code help: Property loops

you said dan, you mean than?(yes, me, correcting grammar😂)

that was on purpose.

-_-

the one time i correct some one its on purpose.

1 Like

I need pics, what do you mean by a counter loop?

A counter (or trigger loop) is when something infinitely triggers itself by itself. Something like this (my screenshot btw):
image
You can use triggers or counters, both are fine. Triggers are the easier choice (in my opinion).

What’s the property for again?

The property is “clicks per second”, I need it because if “clicks per click” is 2, every second you gain 2 “clicks”

Will it only go up by 1 every time?

If so, then there might be an easier way.

No, i’m planning on making an upgrade that increases it by 5, 10, 100, 500, 1,000, 5,000 and 1,000,000.

One million, geez. Lemme think…

cause that’s gonna be a whole lotta counters.

This is why I was having trouble. I already did the buying system and the block code for the upgrades, I just need the upgrades to work.

Well, I know a system that would work, but it would be very tedious and time-consuming.

What is it? Is there a lot of repeating? Because I didn’t code much on my game, only one upgrade and a clicking system.

Well… You’d need a base delay… Let’s go with .02, since it cleanly divides 1. The maximum this can go is 50 times a second. You have 50 times that it triggers. You only need it to trigger x times. You’d set frequency to 50 divided by x. That is how many ticks has one run time. After that, once you start the loop, you’d need to have a running count of how many times it has run. If that count is roughly a multiple of the frequency, then you run the code.

2 Likes

Don’t mark a solution unless you’ve finished implementing it… I have a feeling that this will require more discussion as that’s only the gist of it.

Okay, i’l’ implant it into my game

1 Like

thanks getrithekd, i had to leave

Quick question, can it do the task multiple times at once? E.g. can it increase a property by more than one or does it have to tick by one each time?

Well, technically speaking, you could have a trigger loop that has 0 delay, so it could be instant (but it probably won’t be anyway).

If the delay is 0, then it will hit the channel/wire cap.

1 Like

Tbh 1 mil will be… Idk if it will work

Unless you increase it at greater intervals per sec

But this is solved so I assume you got it to work.

1 Like