Poll

This question is boring

Yep
0 (0%)
He is just a poor noob
1 (100%)

Total Members Voted: 1

Author Topic: [VCE] How to make events " Check the rank and print" ?  (Read 898 times)

I am building swimming pool with 8 lane.

(im noob and cant speak english well...sry)

i want to make the VCE event that when players return and touch his own wall(goal in spot),

then automatically check the rank and print that to their print block

i tried that : one block(walls) set like

onplayertouch > self > modvariable > brick / rank / add / 1

and copied to athoer walls intent to...

(Situation) A-player touch his wall then "rank" increase to 1 and then B-player touch his wall

"rank" will be increased to 2...

am i right?

if my try was right....i dont know next step.

if i was wrong...plz reply(i beg you the Screenshot)


Problem: a player can just sit on one wall and infinitely increase his rank.

The system I suggest you set up:
Code: [Select]
3 named bricks
Lane1_Rank
Lane1_WallA
Lane1_WallB

Rank is the print brick.
Wall A is the wall closest to the print brick.
Wall B is on the opposite side of the pool.

-WallA Events-
OnPlayerTouch > Lane1_WallB > SetEventenabled 0 [check]
OnPlayerTouch > Lane1_Rank > incPrintCount 1
OnPlayerTouch > Self > seteventenabled 0 1 2 [unchecked]

-WallB Events-
OnPlayerTouch > Lane1_WallA > SetEventenabled 0 1 2 [check]
OnPlayerTouch > Self > SetEventenabled 0 [uncheck]

You can also use "OnPlayerTouch > Lane1_Rank > vceModVariable <var:br:printcount> Add 1" too modify the print count, but that just makes the build more complicated and less compatible with other servers.

sry....im trying to check his rank...

not how many times he shuttle the lane.

when he touched first(touch on his own wall). he wins = gold medal

and someone touched later(touch on his own wall) he = sivel medal

Code: [Select]
4 named bricks
Lane1_Rank
Lane1_WallA
Lane1_WallB
Lane_Sorter
Lane_Reset

Rank is the print brick.
Wall A is the wall closest to the print brick.
Wall B is on the opposite side of the pool.
Sorter sorts the lanecounts to establish a rank.
Reset resets the lanecount.

-WallA Events-
OnPlayerTouch > Lane1_WallB > SetEventenabled 0 1 2 3[check]
OnPlayerTouch > Lane1_Rank > vce_ModVariable Brick lanecount Add 1
OnPlayerTouch > Lane_Sorter > fireRelay
OnPlayerTouch > Self > seteventenabled 0 1 2 3 [unchecked]

-WallB Events-
OnPlayerTouch > Lane1_WallA > SetEventenabled 0 1 2 3[check]
OnPlayerTouch > Lane1_Rank > vce_ModVariable Brick lanecount Add 1
OnPlayerTouch > Lane_Sorter > fireRelay
OnPlayerTouch > Self > SetEventenabled 0 1 2[uncheck]

-Sorter Events-(assuming you make three lanes)
Onrelay > Lane1_Rank > vce_ModVariable Brick printcount set 0
Onrelay > self > vce_ifvalue <var:nb_Lane1_Rank:lanecount> > <var:nb_Lane2_Rank:lanecount> 2 3
Onvariabletrue > Lane1_Rank > vce_ModVariable Brick printcount add 1
Onvariabletrue > Lane1_Rank > vce_ModVariable Brick lanecount add .01
Onrelay > self > vce_ifvalue <var:nb_Lane1_Rank:lanecount> > <var:nb_Lane3_Rank:lanecount> 5 6
Onvariabletrue > Lane1_Rank > vce_ModVariable Brick printcount add 1
Onvariabletrue > Lane1_Rank > vce_ModVariable Brick lanecount add .01
Onrelay > self > vce_ifvalue <var:nb_Lane2_Rank:lanecount> > <var:nb_Lane1_Rank:lanecount> 8 9
Onvariabletrue > Lane2_Rank > vce_ModVariable Brick printcount add 1
Onvariabletrue > Lane2_Rank > vce_ModVariable Brick printcount add .01
Onrelay > self > vce_ifvalue <var:nb_Lane2_Rank:lanecount> > <var:nb_Lane3_Rank:lanecount> 11 12
Onvariabletrue > Lane2_Rank > vce_ModVariable Brick printcount add 1
Onvariabletrue > Lane2_Rank > vce_ModVariable Brick printcount add .01
Onrelay > self > vce_ifvalue <var:nb_Lane3_Rank:lanecount> > <var:nb_Lane1_Rank:lanecount> 14 15
Onvariabletrue > Lane3_Rank > vce_ModVariable Brick printcount add 1
Onvariabletrue > Lane3_Rank > vce_ModVariable Brick printcount add .01
Onrelay > self > vce_ifvalue <var:nb_Lane3_Rank:lanecount> > <var:nb_Lane2_Rank:lanecount> 17 18
Onvariabletrue > Lane3_Rank > vce_ModVariable Brick printcount add 1
Onvariabletrue > Lane3_Rank > vce_ModVariable Brick printcount add .01

-Reset Events-(again assuming you make three lanes)
OnWhatever > Lane1_Rank > vce_modVariable brick lanecount set 0
OnWhatever > Lane1_Rank > vce_modVariable brick printcount set 0
OnWhatever > Lane1_WallA > seteventenabled 0 1 2 3[uncheck]
OnWhatever > Lane1_WallB > seteventenabled 0 1 2 3[check]
OnWhatever > Lane2_Rank > vce_modVariable brick lanecount set 0
OnWhatever > Lane2_Rank > vce_modVariable brick printcount set 0
OnWhatever > Lane2_WallA > seteventenabled 0 1 2 3[uncheck]
OnWhatever > Lane2_WallB > seteventenabled 0 1 2 3[check]
OnWhatever > Lane3_Rank > vce_modVariable brick lanecount set 0
OnWhatever > Lane3_Rank > vce_modVariable brick printcount set 0
OnWhatever > Lane3_WallA > seteventenabled 0 1 2 3[uncheck]
OnWhatever > Lane3_WallB > seteventenabled 0 1 2 3[check]
I'm pretty sure that will work.  If it doesn't, poop.

then...

If lane 1 player wins the game=first arrive(in 1 shuttel game)

his(=his onw print block's) printcount will be 2 (add by comparison)

and lanecount will be 2.2 (2-add by wall + 0.2-add by comparison)

second arrived player will 1 & 2.1 and so on

in conclusion highest printcount( or lanecount) player win, Am i right?

thank you so much

If you don’t mind me asking more....I have 2 Question


1 :  in vce_ModVariable / Brick / printcount / add / .01  "printcount" is variable's name, right?
      Q= Does that have the punction - print to printblock?
            if it doesn't, these event cant print "printcount" to rank block(printblock)

2 : if named brick have brick variable (in this case Lane1_Rank's "printcount") and
     I want to use this variale as value then
     Q=Is value's name to be <var : nb_XXXX : variable's name>. not <var : br : variable's name>?
          (Simply : nb_XXXX = right / br = wrong ?)

punction X --> function
sry...

I got a little paranoid over an error so this:
Onvariabletrue > Lane3_Rank > vce_ModVariable Brick printcount add .01

Isn't really needed, I don't think.  But you can't edit posts in the help topic, and it won't hurt anything, so I left it alone.

1 : Yes printcount is the variable's name.  If you were to use it in an ifVariable or ifValue sort of situation you would express it as <var:br:printcount> or <var:nb_Lane#_Rank:printcount>

2 : It depends on where the event is coming from.  So, if the variable is on the current brick you can use br or nb_name.  If it's in another brick use nb_name.  So the following cases should work(if they don't I need to do alot of checking up on my VCE skills):

Brick_A
Brick_B

Brick_A is checking Brick B's colorid.
Brick_B is checking its own colorid.

Brick A

OnActivate > self > vce_ifValue <var:nb_Brick_B:colorid> == 0 [4 4]
OnActivate > Brick_B > vce_ifValue <var:br:colorid> == 0  [9 9]
OnActivate > Brick_B > vce_ifValue <var:nb_Brick_B:colorid> == 0 [10 10]
OnVariableTrue > Client > ChatMessage <color:FFFFFF>Brick A Test1 Success!
[delay 1000] OnVariableTrue > self > spawnexplosion tank shell [slider 2.000]

Brick B
onActivate > Brick_B > vce_ifValue <var:br:colorid> == 0  [5 5]
OnActivate > self > vce_ifValue <var:nb_Brick_B:colorid> == 0 [6 6]
OnActivate > self > vce_ifValue <var:br:colorid> == 0 [7 7]
OnActivate > Brick_B > vce_ifValue <var:br:colorid> == 0 [8 8]
OnActivate > Brick_A > vce_ifValue <var:nb_Brick_B:colorid> == 0 [4 4]
OnVariableTrue > Client > ChatMessage <color:FFFFFF>Brick B Test1 Success!
OnVariableTrue > Client > ChatMessage <color:FFFFFF>Brick B Test2 Success!
OnVariableTrue > Client > ChatMessage <color:FFFFFF>Brick B Test3 Success!
OnVariableTrue > Client > ChatMessage <color:FFFFFF>Brick B Test4 Success!
OnVariableTrue > Client > ChatMessage <color:FFFFFF>Brick A to Brick B Test2 Success!
OnVariableTrue > Client > ChatMessage <color:FFFFFF>Brick A to Brick B Test3 Success!

Please note for any of these to work the color of the brick must be 0.  That's the color on the upperleft corner of the color palette.


You may have noticed that Brick A only has two onvariabletrue on it.  That is because if you can only get a response from the brick you're calling the ifValue on.  So, since the second two ifValue's were called on Brick_B, that's where the the response must be made.

Brick_B is just flipping and asking itself the same question for the first four ifValues, but on the fifth, it asks Brick_A a question about Brick_B.  And Brick_A answers by exploding.  Cause why not.


Hopefully that explains some stuff(and hopefully I got it all right).  I'm thinking about writing a VCE tutorial.  So people asking questions like this is a big help.

in b bricks event : XXX > B brick > if <var:br:~~> = XXX > self > if <var:br:~~>....i understand it.

thanks and

until now I didn't understand Target category's role when 'VCE if' was activate.

your teaching "~it asks Brick_A a question about Brick_B.  And Brick_A answers by exploding."

Target(brick A) not also just target of question, it also do it(or activate something) resultant answer. Eureka!!!

your answer is really really help to me

thank you again.~

i mean "Target do(activate)" is  do or pass sequance by order(ex[4 4])

anyway i said ALLLLLLL RIGHT~