Author Topic: VCE help.  (Read 1493 times)

I need some help.I want to make one pair of bricks appear,and another disappear when a player enters a zone.but what i need help is how to make it randomly select one pair of the bricks to appear and one to disappear.so that it changes every time you enter the zone.i am new to vce and really need the help.

0 onplayerenterzone>namedbrick[brickgroup1]>dissapear[-1] - enabled
1 onplayerenterzone>namedbrick[brickgroup2]>dissapear[0] - enabled
2 onplayerenterzone>namedbrick[brickgroup1]>dissapear[0] - disabled
3 onplayerenterzone>namedbrick[brickgroup2]>dissapear[-1] - disabled
4 onplayerenterzone>self>toggleeventsenabled[0 1 2 3]

0 onplayerenterzone>namedbrick[brickgroup1]>dissapear[-1] - enabled
1 onplayerenterzone>namedbrick[brickgroup2]>dissapear[0] - enabled
2 onplayerenterzone>namedbrick[brickgroup1]>dissapear[0] - disabled
3 onplayerenterzone>namedbrick[brickgroup2]>dissapear[-1] - disabled
4 onplayerenterzone>self>toggleeventsenabled[0 1 2 3]
i really want to do it with vce.like,how would you make it when you enter the zone,it makes a 50/50 change of one group appearing and one not?

0 onPlayerEnterZone -> Self -> VCE_modVariable -> Ran -> Set -> 1
1 onPlayerEnterZone -> Self -> VCE_modVariable -> Ran -> randomNum -> 2
2 onPlayerEnterZone -> Self -> VCE_ifValue -> <var:br:Ran> -> Equals -> 1 -> 3 3
3 onVariableTrue -> Client -> chatMsg -> You got a one!
4 onPlayerEnterZone -> Self -> VCE_ifValue -> <var:br:Ran> -> Equals -> 2 -> 5 5
5 onVariableTrue -> Client -> chatMsg -> You got a two!

0 onPlayerEnterZone -> Self -> VCE_modVariable -> Ran -> Set -> 1
1 onPlayerEnterZone -> Self -> VCE_modVariable -> Ran -> randomNum -> 2
2 onPlayerEnterZone -> Self -> VCE_ifValue -> <var:br:Ran> -> Equals -> 1 -> 3 3
3 onVariableTrue -> Client -> chatMsg -> You got a one!
4 onPlayerEnterZone -> Self -> VCE_ifValue -> <var:br:Ran> -> Equals -> 2 -> 5 5
5 onVariableTrue -> Client -> chatMsg -> You got a two!
do i change the onVariableTrue ones to -> group* -> dissapear for it to work how i want it?

do i change the onVariableTrue ones to -> group* -> dissapear for it to work how i want it?
To the brick groups you want to dissapear, yes.

thanks,i'll lock this topic when i test it.

i just thought you wanted it to be toggled, in which case my way would be more efficient

not really,i want a more random chance then just switching back and forth.I making a zapt map,and i have two hall ways and they both meet up at the end.What i wanted to do was make this makeshift barricade to randomly switch everytime so that they dont know witch one to choose and will have to guess and if they get the wrong one they will have to go all the way back and take the other.

dang it,Orthone,i put

0 onPlayerEnterZone -> Self -> VCE_modVariable -> Ran -> Set -> 1
1 onPlayerEnterZone -> Self -> VCE_modVariable -> Ran -> randomNum -> 2
2 onPlayerEnterZone -> Self -> VCE_ifValue -> <var:br:Ran> -> Equals -> 1 -> 3 3
3 onVariableTrue -> Namedbrick -> group1 -> dissapear ->  -1
3 onVariableTrue -> Namedbrick -> group2 -> dissapear ->   0
4 onPlayerEnterZone -> Self -> VCE_ifValue -> <var:br:Ran> -> Equals -> 2 -> 5 5
3 onVariableTrue -> Namedbrick -> group1 -> dissapear ->   0
3 onVariableTrue -> Namedbrick -> group2 -> dissapear ->  -1
and only one group appeared and then it wouldn't change everytime i went into the zone.please help.

if you're using ZAPT, why not use the input it gives you when the minigame resets?
dang it,Orthone,i put

0 onPlayerEnterZone -> Self -> VCE_modVariable -> Ran -> Set -> 1
1 onPlayerEnterZone -> Self -> VCE_modVariable -> Ran -> randomNum -> 2
2 onPlayerEnterZone -> Self -> VCE_ifValue -> <var:br:Ran> -> Equals -> 1 -> 3 3
3 onVariableTrue -> Namedbrick -> group1 -> dissapear ->  -1
3 onVariableTrue -> Namedbrick -> group2 -> dissapear ->   0
4 onPlayerEnterZone -> Self -> VCE_ifValue -> <var:br:Ran> -> Equals -> 2 -> 5 5
3 onVariableTrue -> Namedbrick -> group1 -> dissapear ->   0
3 onVariableTrue -> Namedbrick -> group2 -> dissapear ->  -1
and only one group appeared and then it wouldn't change everytime i went into the zone.please help.
err, you can't have 2 lines of events on one line, make that 4 lines of events on one line

dang it,Orthone,i put

0 onPlayerEnterZone -> Self -> VCE_modVariable -> Ran -> Set -> 1
1 onPlayerEnterZone -> Self -> VCE_modVariable -> Ran -> randomNum -> 2
2 onPlayerEnterZone -> Self -> VCE_ifValue -> <var:br:Ran> -> Equals -> 1 -> 3 4
3 onVariableTrue -> Namedbrick -> group1 -> dissapear ->  -1
4 onVariableTrue -> Namedbrick -> group2 -> dissapear ->   0
5 onPlayerEnterZone -> Self -> VCE_ifValue -> <var:br:Ran> -> Equals -> 2 -> 6 7
6 onVariableTrue -> Namedbrick -> group1 -> dissapear ->   0
7 onVariableTrue -> Namedbrick -> group2 -> dissapear ->  -1
and only one group appeared and then it wouldn't change everytime i went into the zone.please help.

Make the bolded changes.

Make the bolded changes.
i'll try that. Also,could i delete the last three lines and just add onvarblefalse lines?

i'll try that. Also,could i delete the last three lines and just add onvarblefalse lines?
If you don't plan on having any more groups, yes. You would need to change the "3 4" line to "3 6"

If you don't plan on having any more groups, yes. You would need to change the "3 4" line to "3 6"
ok,i'll try that way if the other one fails.