Device If Then Statements

So this was something I was experimenting around with (I don’t think this has been made before) to conserve memory and found this interesting loop.
As opposed to a trigger loop (540 memory) this is 250 memory. I’m trying to figure out ways to implement this and I found that I could use it to.
Here is the final product:
image
Screenrecording2024-10-189.08.15AM-ezgif.com-resize

First add a trigger that when triggers transmits on +1 and trigger when receiving trigger. The last thing to do in this trigger is add a delay of 1. Next place down the counter. Set the starting value to -1 and have it increment when receiving on +1. Set update property to yes and have it update property Counter.

Add a checker that checks when receiving on check. When check passes transmit on 1. When check fails passes transmit on else if. It’s check type should be value of property, property Counter. It’s comparison should be equal to and value should be 1. Copy that checker. Change when check passes transmit on else if and remove the when check fails transmit on.

Add a third checker that checks when receiving on else if. When check passes transmit on 3. When check fails passes transmit on else. It’s check type should be value of property, property Counter. It’s comparison should be equal to and value should be 3. Copy that checker. Change when check passes transmit on else and remove the when check fails transmit on.

Add a third checker that checks when receiving on else. When check passes transmit on 5. When check fails passes transmit on trigger. It’s check type should be value of property, property Counter. It’s comparison should be equal to and value should be 5.

Finally we want to place down a property and property name it Counter. The property type should be number and set the default value to -1. Finally, when property value changes, transmit on check.


How does this work?
When we first trigger it, it increases the counter. This will update the property. When the property value changes, it runs the first two checkers. If the value is == to 1 it will both broadcast on 1[1] and broadcast on else if[2]. If the value != 1 it will broadcast on else if[3]. The next set of checkers does the same thing, except with the number “3”. Finally, it will run through the final checker. If [Counter != 5] it will trigger the trigger again, repeating this whole process. If [Counter == 5] it will not trigger the trigger, finally ending this loop.


Any ideas on how this can be used? I have some but I am still working on them.


  1. Showing the “1” text ↩︎

  2. Which runs the next set of checkers ↩︎

  3. Which runs the next set of checkers ↩︎

4 Likes

Its 40 memory…

1 Like

a trigger with block code is 540

it looks and sounds like a bulky loop system but I might need it since trigger loops(sounds like a cereal o.o) are starting to hate me each time I use em it either randomly stops and I have to start and restart the game to get it to work or either it just breaks my systems ._.

1 Like

It is very bulky, but it does save memory.

wut. no one ever posted this? lol.
i use this for simple animation with multiple objects in a single frame.
the only bad thing is that it only saves memory up to a certain extent :/

1 Like

A trigger loop is only 40 memory, I believe you meant a Trigger Check?

Yes, that’s what he meant.

No… A trigger loop is one trigger with blockcode. 540

1 Like

I think most people don’t think of trigger loops having block code lol

3 Likes

Honestly I’d didn’t either…
I think chrys was like “why not use one trigger with blockcode instead of two wired together”
And everyone else was like “butbutbutb-b–b-b-bb–b-b-b-b-b–b-b-b-b-b-b–”
It might not have been chrys. but this did happen

2 Likes

a trigger loop is a trigger that triggers on a message and when triggered brodcasts a message on the same channel that triggers it, no block code needed
Brodcasts on X recieve on X

1 Like

Most trigger loops use blockcode in order to achieve some goal (most commonly timers). You getting in schematics which wasn’t what I was going for. Also I have been here almost 5x as long as you have I KNOW what a trigger loop is. A


Unless you are going to actually contribute please don’t reply. I don’t want my topic closed; ie, stop arguing about it.

1 Like

Can’t you just use checkers and spare the need for a counter?

2 Likes

ooh nice. ok, so how do we make a if else loop using triggers again? (I normally just use block code)

wait, then how does one update the property?

I mean that if statements don’t always have to update a property.

2 Likes

Yeah, It was something I accidentally stumbled on while fooling around, it wasn’t something I was trying to create.

1 Like