Discuss Scratch

PegaCorni99
Scratcher
9 posts

How to make a voting booth?

How to make a voting booth?

when green flag clicked
ask [How to make a voting booth?] and wait

Last edited by PegaCorni99 (Aug. 2, 2021 08:08:27)

Harakou
Scratcher
1000+ posts

How to make a voting booth?

Moved to Help With Scripts.
deck26
Scratcher
1000+ posts

How to make a voting booth?

If you only want people to vote once you need to use cloud variables and save the encoded usernames. If you don't care about that just use a cloud variable for each option.
PegaCorni99
Scratcher
9 posts

How to make a voting booth?

deck26 wrote:

If you only want people to vote once you need to use cloud variables and save the encoded usernames. If you don't care about that just use a cloud variable for each option.
ok
mafrtpoll
Scratcher
100+ posts

How to make a voting booth?

try this. i dont know if it works or not

when this sprite clicked
if <<(username) = (username)> and <(☁ Voted ) = [no]>> then
change [☁ Voting v] by (1)
Set [☁ Voted v] to [ yes ]
end

Last edited by mafrtpoll (Aug. 2, 2021 17:05:11)

dodecahedron07
Scratcher
10 posts

How to make a voting booth?

mafrtpoll wrote:

try this. i dont know if it works or not

when this sprite clicked
if <<(username) = (username)> and <(☁ Voted ) = [no]>> then
change [☁ Voting v] by (1)
Set [☁ Voted v] to [ yes ]
end

Username = Username is unnecessary in this scenario because logged out people can’t interfere with cloud variables.
The cloud variable “Voted” is not supposed to be a cloud variable because when another user has voted, the next user can’t vote because “Voted” is set to yes.

Last edited by dodecahedron07 (Aug. 2, 2021 20:36:44)

dodecahedron07
Scratcher
10 posts

How to make a voting booth?

dodecahedron07 wrote:

mafrtpoll wrote:

try this. i dont know if it works or not

when this sprite clicked
if <<(username) = (username)> and <(☁ Voted ) = [no]>> then
change [☁ Voting v] by (1)
Set [☁ Voted v] to [ yes ]
end

Username = Username is unnecessary in this scenario because logged out people can’t interfere with cloud variables.
The cloud variable “Voted” is not supposed to be a cloud variable because when another user has voted, the next user can’t vote because “Voted” is set to yes.

So here’s my rendition:

when this sprite clicked
change [ ☁️vote count v] by (1)
set [voted v] to [voted]
Do.not set these variables with green flag. Just make these variables and press Save Now and run away

Last edited by dodecahedron07 (Aug. 2, 2021 20:37:05)

PegaCorni99
Scratcher
9 posts

How to make a voting booth?

dodecahedron07 wrote:

dodecahedron07 wrote:

mafrtpoll wrote:

try this. i dont know if it works or not

when this sprite clicked
if <<(username) = (username)> and <(☁ Voted ) = [no]>> then
change [☁ Voting v] by (1)
Set [☁ Voted v] to [ yes ]
end

Username = Username is unnecessary in this scenario because logged out people can’t interfere with cloud variables.
The cloud variable “Voted” is not supposed to be a cloud variable because when another user has voted, the next user can’t vote because “Voted” is set to yes.

So here’s my rendition:

when this sprite clicked
change [ ☁️vote count v] by (1)
set [voted v] to [voted]
Do.not set these variables with green flag. Just make these variables and press Save Now and run away
PegaCorni99
Scratcher
9 posts

How to make a voting booth?

dodecahedron07 wrote:

dodecahedron07 wrote:

mafrtpoll wrote:

try this. i dont know if it works or not

when this sprite clicked
if <<(username) = (username)> and <(☁ Voted ) = [no]>> then
change [☁ Voting v] by (1)
Set [☁ Voted v] to [ yes ]
end

Username = Username is unnecessary in this scenario because logged out people can’t interfere with cloud variables.
The cloud variable “Voted” is not supposed to be a cloud variable because when another user has voted, the next user can’t vote because “Voted” is set to yes.

So here’s my rendition:

when this sprite clicked
change [ ☁️vote count v] by (1)
set [voted v] to [voted]
Do.not set these variables with green flag. Just make these variables and press Save Now and run away

Ok then
SonicFanX123_321
Scratcher
1000+ posts

How to make a voting booth?

PegaCorni99
Scratcher
9 posts

How to make a voting booth?

SonicFanX123_321 wrote:


Yes and thanks for the help ^^

Powered by DjangoBB