Author Topic: startvote event  (Read 1455 times)

But I want new events NOW!

But I want new events NOW!

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.

Events...definately...
I like VCE, but I don't want to put in all that! ^^^

i dont want them to have to press a button, i would live with that if there was some way to detect chat

Detecting live chat for everyone would be hard through the VCE because it would require some form of starting an event loop.

Detecting live chat for everyone would be hard through the VCE because it would require some form of starting an event loop.
easy, use print counts as the loop, one brick works for all

Also a rtv for maps would be cool for dedicated freebuilds or some stuff

easy, use print counts as the loop, one brick works for all

I've heard that, but never gotten it to work.

I'll try it.