Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make a voting booth?
- 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)
- 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?
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?
try this. i dont know if it works or notwhen 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?
try this. i dont know if it works or notwhen 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 clickedDo.not set these variables with green flag. Just make these variables and press Save Now and run away
change [ ☁️vote count v] by (1)
set [voted v] to [voted]
Last edited by dodecahedron07 (Aug. 2, 2021 20:37:05)
- PegaCorni99
-
Scratcher
9 posts
How to make a voting booth?
try this. i dont know if it works or notwhen 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 clickedDo.not set these variables with green flag. Just make these variables and press Save Now and run away
change [ ☁️vote count v] by (1)
set [voted v] to [voted]
- PegaCorni99
-
Scratcher
9 posts
How to make a voting booth?
try this. i dont know if it works or notwhen 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 clickedDo.not set these variables with green flag. Just make these variables and press Save Now and run away
change [ ☁️vote count v] by (1)
set [voted v] to [voted]
Ok then
- Discussion Forums
- » Help with Scripts
-
» How to make a voting booth?
