Discuss Scratch

tt_thoma
Scratcher
100+ posts

Cloud var disappearing for no reason

I'm making a simple cloud multiplayer game that saves and load positions https://scratch.mit.edu/projects/650056296 , but the
 (☁ positions) 
var is always getting empty or with only 8 letters when two clients are connected…
Do you have an idea of what is happening ?

​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ Advertisement
Hello scratcher!
Would you like to take a look at some of my projects ?

​​​ Mike's big Showdown - Practice mode ​ ​ ​ ​ ​ ​ ​ Just Shapes and Clones​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​​ScratchScript

And further more on my profile !

tt_thoma
—————-
Contact me: tt-thoma@programmer.net​ ​ ​ ​ ​ ​ - ​ ​ ​ ​ ​ ​My website: tt-thoma.github.io/tt-thoma
Forbidden website tag (13+) : tt_thoma#6939
BlueShockOfficial
Scratcher
5 posts

Cloud var disappearing for no reason

Hey,
Judging your issue the reason is because it is only one variable and it can't save two positions at once, you can make each user have an ID and make multiple variable but that is all I can help you with.

when green flag clicked
grab variable [] from from project []

BlueShock here, like my idea above? Same!
lion334
Scratcher
100+ posts

Cloud var disappearing for no reason

You need two variables. I recommend doing this:

when green flag clicked
set [cloudvar1] to [0]
set [cloudvar2] to [0]
wait (3) secs
if <[(cloudvar1)] = [0]> then
set [assignedplayer] to [1]


else
set [assignedplayer] to [2]
end
That way you get the classification into the Playerbase. You need to know that if the Positions arent getting updated every 0-2 seconds, it isn't gonna work since both vars would be on 0.

- lion334

Hi, I'm Mirau or lion334

Made some cool game a while ago: You're not gonna click it though… right?


tt_thoma
Scratcher
100+ posts

Cloud var disappearing for no reason

I want to do multiple servers

​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ Advertisement
Hello scratcher!
Would you like to take a look at some of my projects ?

​​​ Mike's big Showdown - Practice mode ​ ​ ​ ​ ​ ​ ​ Just Shapes and Clones​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​​ScratchScript

And further more on my profile !

tt_thoma
—————-
Contact me: tt-thoma@programmer.net​ ​ ​ ​ ​ ​ - ​ ​ ​ ​ ​ ​My website: tt-thoma.github.io/tt-thoma
Forbidden website tag (13+) : tt_thoma#6939
tt_thoma
Scratcher
100+ posts

Cloud var disappearing for no reason

BlueShockOfficial wrote:

Hey,
Judging your issue the reason is because it is only one variable and it can't save two positions at once, you can make each user have an ID and make multiple variable but that is all I can help you with.
Im making a split system (player id 1 = first 9 digits; player id 2 = after the first position, from 10 to 19)

​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ Advertisement
Hello scratcher!
Would you like to take a look at some of my projects ?

​​​ Mike's big Showdown - Practice mode ​ ​ ​ ​ ​ ​ ​ Just Shapes and Clones​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​​ScratchScript

And further more on my profile !

tt_thoma
—————-
Contact me: tt-thoma@programmer.net​ ​ ​ ​ ​ ​ - ​ ​ ​ ​ ​ ​My website: tt-thoma.github.io/tt-thoma
Forbidden website tag (13+) : tt_thoma#6939

Powered by DjangoBB