Discuss Scratch

kingKASEtheGREATalt
Scratcher
100+ posts

List Items Disappearing When Using Custom Block

I'm working on a multiplayer engine and the player items are disappearing on character at a time. The lengths are the same so I dont know why. The project is here: https://scratch.mit.edu/projects/990159883/

kingKASEtheGREATalt
Scratcher
100+ posts

List Items Disappearing When Using Custom Block

bump

MrKingofScratch
Scratcher
100+ posts

List Items Disappearing When Using Custom Block

which custom block is causing the issue?

Last edited by kaj (Tomorrow 00:00:00)
100th post!
kingKASEtheGREATalt
Scratcher
100+ posts

List Items Disappearing When Using Custom Block

MrKingofScratch wrote:

which custom block is causing the issue?
define set player data for slot (slot) to (value)

kingKASEtheGREATalt
Scratcher
100+ posts

List Items Disappearing When Using Custom Block

bump

kingKASEtheGREATalt
Scratcher
100+ posts

List Items Disappearing When Using Custom Block

bump

MrKingofScratch
Scratcher
100+ posts

List Items Disappearing When Using Custom Block

Okay i'll try to check it out.

Last edited by MrKingofScratch (March 27, 2024 23:30:17)


Last edited by kaj (Tomorrow 00:00:00)
100th post!
MrKingofScratch
Scratcher
100+ posts

List Items Disappearing When Using Custom Block

Interestingly enough, unchecking “run without screen refresh” does the trick (and use turbo mode to speed it up again). Do you have any other scripts that rely on anything changed in that list?

If so, you might want to look into using ticks instead of the forever loop.

Last edited by kaj (Tomorrow 00:00:00)
100th post!
kingKASEtheGREATalt
Scratcher
100+ posts

List Items Disappearing When Using Custom Block

MrKingofScratch wrote:

Interestingly enough, unchecking “run without screen refresh” does the trick (and use turbo mode to speed it up again). Do you have any other scripts that rely on anything changed in that list?

If so, you might want to look into using ticks instead of the forever loop.

no not currently, but i plan to have some.

do ticks mean
when green flag clicked
forever
broadcast [tick]
wait (0) secs
end

when I receive [tick]
...
?

MrKingofScratch
Scratcher
100+ posts

List Items Disappearing When Using Custom Block

Item 9 starts with only 20 items instead of 26 idk if this has something to do with it

Last edited by kaj (Tomorrow 00:00:00)
100th post!
MrKingofScratch
Scratcher
100+ posts

List Items Disappearing When Using Custom Block

Sorry, I'm really struggling with this one. I'll try to solve it again lator. In the meantime, could you add comments with the functions of the variables? (what does playerslots1-9 hold, is it the data being transmitted? etc)

(btw the ticks didn't work)

Last edited by MrKingofScratch (March 28, 2024 00:10:09)


Last edited by kaj (Tomorrow 00:00:00)
100th post!
kingKASEtheGREATalt
Scratcher
100+ posts

List Items Disappearing When Using Custom Block

MrKingofScratch wrote:

Sorry, I'm really struggling with this one. I'll try to solve it again lator. In the meantime, could you add comments with the functions of the variables? (what does playerslots1-9 hold, is it the data being transmitted? etc)

(btw the ticks didn't work)
added it to the blocks, playerSlots1-9 holds player 1-9's player data, separated every 26 characters. same goes for others beside a change in what player data it holds

kingKASEtheGREATalt
Scratcher
100+ posts

List Items Disappearing When Using Custom Block

im good with this now, i had very strange code that i completely fixed and now have a working prototype

MrKingofScratch
Scratcher
100+ posts

List Items Disappearing When Using Custom Block

nice!

Last edited by kaj (Tomorrow 00:00:00)
100th post!

Powered by DjangoBB