Yep, thatâs basically what AUO is.
Ok so I just found a cool memory save. Itâs not enough information to make itâs own post, so I decided to just tack it on here. If you want to set a varible to 0 if something is false, and to 1 if something is true, this code works:
Because Blockly auto sets all varibles to 0, this will set x to 1 if the statement is true, and set x to 0 if the statement is false. Just a quick way to save 2 blocks!
noice
Should we make a new line of guides, like [ PSA! ] and [
Resources ], called [
Mini-Guide ]? It would be useful for information we thought was too short to make its own guide.
- Yes
- No
0 voters
âoh no!â
âthatâs right: itâs time to learn things!!â
I would love to have a phrase correlated to my name that means a long, very good, detailed explanation!
Petition to put AUO under concepts in the gimkit docs lol
Lol that would be cool but most gimkit creators wouldnât really understand lol
Javascript is different from some other coding languages because itâs single-threaded which means that it operates tasks through a sequence of events (an event loop). Itâll go through each task in the sequence and update UI (what appears on the screen) according to it. So like block code, wires, and stuff like that will go through the event loop, but block code runs but also doesnât block the main thread so while block code runs, other events can happen I assume.
As for why block code is used instead of coding languages, a coding language could block the event loop which would create more lag in a creative game, which could result in breaking the system, while block code runs aside from the event loop and possibly adds the result to the event loop while maybe being in another specific order(? this idea might have to be investigated more)
i might have gotten that so wrong and offended programmers, mb if thatâs the case
Right, but for slightly wrong reasons.
(the below is theory based of of programming knowledge and experiments.)
Gimkit stores connections between devices in a list. When its triggering connections, it just loops over the list. Because connections are appended to the list, the first one placed will be the first one appended, and therefore the first one triggered.
Makes sense.
Josh said that he doesnât even know the update order for gimkit, BUT, he did confirm AUO is correct!
Dang it we should have asked him to list it as a concept in the docs.
Question:
If I made a channel, then wired something to something else, would the wire always act second, even if I deleted and replaced one of the devices that use the channel?
Because of the way channels are triggered, it could be either one I think
I got my modified popup shop to work. Just a bit of channel shuffling.
In one of my recent projects, AUO was actually somewhat useful. I wanted to limit the total number of items a player could hold to 1, dropping any excess items instead of destroying them. This ended up being more challenging than I thought, and the solution I came up with involved giving the player overfill of the excess item and then instantly removing it from their inventory. Without AUO, the small delay between the two actions caused an annoying +1 item popup to appear for the item which was about to be removed from the inventory. Correcting for the update order greatly improved the user experience and simplified the wiring. AUO pulled through big time!
Wait, not trying to discount your solution, but couldnât you just use an inventory item manager?
Welcome to the forum, @Taxes! Check out the beginner-must-read and forum-tips for more easy help! Read the Community Guidelines for a gist of the rules. If you ever run into a hard problem, talk to anyone in @trust_level_3. They can help you with hard and in-depth concepts and mechanics!
Wow, a new user that already understands AUO. You donât see that every day.