Author Topic: startvote event  (Read 1466 times)

Ok i had this idea
what if we had an event where players could vote for a certain event to happen
example
Code: [Select]
[onminigamereset]minigame>startnewvote>[what should the vehicle spawn have?][jeep][ball][horse][1:00]
[onvote1][namedbrick>vehicle]>setvehicle>jeep
[onvote2][namedbrick>vehicle]>setvehicle>ball
[onvote3][namedbrick>vehicle]>setvehicle>horse
This would cause everyone in the brickowners minigame to get the message
"what should the vehicle spawn have? Vote lasts for 1:00
type /vote
jeep
ball
horse"

Im not sure if this is even possible but it would be cool to have.

You could do that with the VCE in a minigame.

I could show you how if you want.


Im not sure if this is even possible but it would be cool to have.
Easily possible, but the idea itself needs work.

i was just brainstorming for ways to change the difficulty like for zombie wars where you could change the zombiespawns from slow/normal/fast for a voted hardness level.

i was just brainstorming for ways to change the difficulty like for zombie wars where you could change the zombiespawns from slow/normal/fast for a voted hardness level.


Quit trolling.
I didn't see that as trolling, but as -thumbs up-

I didn't see that as trolling, but as -thumbs up-
It wasn't trolling this time.

Here's some info you need to know:

The variable "tele" is to check to see if the player clicked the link.
The variable "timer" is used to keep track of the time.
The variable "voted" is to check if the player has already voted.
The variable "vote1" is for the Jeep option.
The variable "vote2" is for the Ball option.
The variable "vote3" is for the Horse option.

The Named Brick "Starter" is the brick that starts everything.
The Named Brick "TelePad" is where the players will be teleported.
The Named Brick "Vehicle" is the vehicle spawn



These events go on the Starter brick:

Code: [Select]
[X] 0 [0] onActivate > Self > VCE_ifValue > [<var:client:isAdmin>] == 1 [1 2]
[X] 1 [0] onVariableTrue > Minigame > chatMsgAll > [<color:FFFFFF><varlink:Click Here_tele:1> to vote for a vehicle!]
[X] 2 [0] onVariableFalse > Client > centerPrint > [<color:EEEEEE>You do not have permission to use this feature.]
[X] 3 [0] onVariableUpdate > Client > VCE_ifVariable > [tele] == [1] [4 7]
[X] 4 [0] onVariableTrue > Player > spawnExplosion > Player Death [---------I] 2.000
[X] 5 [33] onVariableTrue > <NAMED BRICK> {TelePad} > setPlayerTransform [North] [ ] [ ]
[X] 6 [50] onVariableTrue > Player > spawnExplosion > Player Death [---------I] 2.000
[X] 7 [100] onVariableTrue > Client > VCE_modVariable > [tele] set [0]
[X] 8 [0] onActivate > Self > VCE_modVariable {Brick} > [timer] set [60]
[X] 9 [33] onActivate > Self > VCE_callFunction > [Countdown] [ ]
[X] 10 [0] onActivate > Self > VCE_stateFunction > [Countdown] [11 11]
[X] 11 [0] onVariableFunction > Self > VCE_ifVariable > [timer] <= [0] [12 15]
[X] 12 [0] onVariableFalse > Self > VCE_modVariable {Brick} > [timer] subtract [1]
[X] 13 [0] onVariableFalse > Minigame > bottomPrintAll > [<color:FFFF00>Time left to vote<color:FFFFFF>: <var:brick:timer>]
[X] 14 [1000] onVariableFalse > Self > VCE_callFunction > [timer] [ ]
[X] 15 [0] onVariableTrue > <NAMED BRICK> {Vehicle} > fireRelay

These events go on the TelePad brick:

Code: [Select]
[X] 0 [0] onPlayerTouch > <NAMED BRICK> {Starter} > VCE_ifVariable > [timer] <= [0]
[X] 1 [0] onVariableTrue > Client > centerPrint > [<color:00FFFF>Selection an option below by saying the option name, then clicking on the vehicle spawn.<br><br><color:FFFF00>Options<color:FFFFFF>:<br><br>Jeep<br>Ball<br>Horse]

These events go on the Vehicle brick:

Code: [Select]
[X] 0 [0] onActivate > Client > VCE_ifVariable > [voted] == [1] [1 4]
[X] 1 [0] onVariableTrue > Client > centerPrint > [<color:EEEEEE>You have already voted!]
[X] 2 [0] onVariableFalse > Self > VCE_ifValue > [<var:client:lastmsg>] == [Jeep] [5 6]
[X] 3 [0] onVariableFalse > Self > VCE_ifValue > [<var:client:lastmsg>] == [Ball] [7 8]
[X] 4 [0] onVariableFalse > Self > VCE_ifValue > [<var:client:lastmsg>] == [Horse] [9 10]
[X] 5 [0] onVariableTrue > Self > VCE_modVariable {Brick} > [vote1] add [1]
[X] 6 [0] onVariableTrue > Self > VCE_modVariable {Client} > [voted] set [1]
[X] 7 [0] onVariableTrue > Self > VCE_modVariable {Brick} > [vote2] add [1]
[X] 8 [0] onVariableTrue > Self > VCE_modVariable {Client} > [voted] set [1]
[X] 9 [0] onVariableTrue > Self > VCE_modVariable {Brick} > [vote3] add [1]
[X] 10 [0] onVariableTrue > Self > VCE_modVariable {Client} > [voted] set [1]
[X] 11 [0] onRelay > Self > VCE_ifVariable > [vote1] > [<var:brick:vote2>] [12 13]
[X] 12 [0] onVariableTrue > Self > VCE_ifVariable > [vote1] > [var:brick:vote3] [14 15]
[X] 13 [0] onVariableFalse > Self > VCE_ifVariable > [vote2] > [<var:brick:vote3] [16 17]
[X] 14 [0] onVariableTrue > Self > setVehicle > Jeep
[X] 15 [0] onVariableFalse > Self > setVehicle > Horse
[X] 16 [0] onVariableTrue > Self > setVehicle > Ball
[X] 17 [0] onVariableFalse > Self > setVehicle > Horse
[X] 18 [30000] onRelay > Self > VCE_callFunction [Wait] [ ]
[X] 19 [0] onRelay > Self > VCE_stateFunction [Wait] [20 23]
[X] 20 [0] onVariableFunction > Self > VCE_modVariable {Brick} > [vote1] set [0]
[X] 21 [0] onVariableFunction > Self > VCE_modVariable {Brick} > [vote2] set [0]
[X] 22 [0] onVariableFunction > Self > VCE_modVariable {Brick} > [vote3] set [0]
[X] 23 [30000] onVariableFunction > Self > VCE_callFunction [Wait More] [ ]
[X] 24 [0] onRelay > Self > VCE_stateFunction [Wait More] [25 25]
[X] 25 [30000] onVariableFunction > Client > VCE_modVariable > [voted] set [0]

In theory, this should work.

i could do this simpler with less lines of events i think...
and what does state/callfuction do?

Phflack you need to teach me how to make a padlock sometime.

i could do this simpler with less lines of events i think...
and what does state/callfuction do?

Functions are like relays with names.

Functions are like relays with names.
interesting, why not just use the sub system then?

I'm using the functions to delay the miliseconds to 90,000ms where the max is 30.

Plus you can call functions that belong to other bricks.