Google Form Vote Counter

This forum is for discussion related to the game.
User avatar
eagerSnake
eagerSnake
Mafia Scum
User avatar
User avatar
eagerSnake
Mafia Scum
Mafia Scum
Posts: 3821
Joined: May 29, 2016

Post Post #25 (ISO) » Wed Jan 25, 2017 9:36 am

Post by eagerSnake »

In post 22, Kison wrote:I believe there is an onSubmit event you can have trigger when a Google Form is submitted. You may be able to have it scan the sheet, determine whether a hammer already has been placed, and either block the submission or perform some additional write to the sheet in that event.
In post 23, PeregrineV wrote:
In post 0, zoraster wrote:Major:
1. When the hammer is reached, the mod won't know about it if a vote is changed. The mod could go back and figure it out from the transcript, but this is designed to make life easier and be foolproof. Is there a google spreadsheet thing I can do to have a switch go if a certain value is reached that won't go back if the number goes down? In other words, I'd like Cell A1 (or whatever) to contain the # needed to lynch. IF Vote Total Cell is ever equal to or greater than A1, B1="Yes" EVEN IF Vote Total Cell is currently below A1.
You could have a log that completes each time a vote occurs?

https://docs.google.com/spreadsheets/d/ ... sp=sharing

Check the hammer condition each time a vote is placed.
both of these work too
User avatar
zoraster
zoraster
He/Him
Disorganized Crime
User avatar
User avatar
zoraster
He/Him
Disorganized Crime
Disorganized Crime
Posts: 21680
Joined: June 10, 2008
Pronoun: He/Him
Location: Belmont, CA

Post Post #26 (ISO) » Wed Jan 25, 2017 1:06 pm

Post by zoraster »

In post 24, eagerSnake wrote:
In post 0, zoraster wrote:
Major:
1. When the hammer is reached, the mod won't know about it if a vote is changed. The mod could go back and figure it out from the transcript, but this is designed to make life easier and be foolproof. Is there a google spreadsheet thing I can do to have a switch go if a certain value is reached that won't go back if the number goes down? In other words, I'd like Cell A1 (or whatever) to contain the # needed to lynch. IF Vote Total Cell is ever equal to or greater than A1, B1="Yes" EVEN IF Vote Total Cell is currently below A1.
Simple just make it so when hammer is reached it changes the cell that contains the formula that detects when the hammer is reached so it won't change the cell back if someone unvotes

i.e. in cell C6 put the formula that if any of cells B4:B34 becomes greater than the hammer number then delete the formula in c6 and change cell c6 to the word hammer, or even simpler just have it write the word hammer in cell c7 if any B4:B34 ever reaches the hammer number
how do I accompish that? Specifically get one formula to delete and replace another
.
User avatar
eagerSnake
eagerSnake
Mafia Scum
User avatar
User avatar
eagerSnake
Mafia Scum
Mafia Scum
Posts: 3821
Joined: May 29, 2016

Post Post #27 (ISO) » Wed Jan 25, 2017 1:14 pm

Post by eagerSnake »

I've never used Google docs but I'm trained to write java script so if they're similar it would be an "if" statement like this

If (B4:B34 > H) {
C7 = "HAMMER";
}

In english: If any cells between B4 and B34 are greater than H (the majority vote #), then change cell C7 to the word "HAMMER."
User avatar
eagerSnake
eagerSnake
Mafia Scum
User avatar
User avatar
eagerSnake
Mafia Scum
Mafia Scum
Posts: 3821
Joined: May 29, 2016

Post Post #28 (ISO) » Wed Jan 25, 2017 2:53 pm

Post by eagerSnake »

Does that make sense?
Post Reply

Return to “Mafia Discussion”