| Blockland Forums > Help |
| Eventing help |
| (1/2) > >> |
| Transformer:
I'm wondering is there a way with events you can limit people per area of a build? I'm intending on using it for arenas for saying 10 people per match then when it's done they get re-spawned out. I'm just unsure on how to do this. |
| Gen. Hothauser:
Not sure what you want, but I think I have an idea, with multiple ways to approach it. First way: actual events, possibly best way. Make the arena and a spawn room. Put a visible brick in the spawn room and an invisible brick in the arena, this is called ARENA. The below events go on the spawn room brick. [ 0] [onactivate] [Self] [VCE_Ifvariable] [players] [==] [10] [1 4] [1] [onvariablefalse] [Self] [VCE_Modvariable] [players] [add] [1] [2] [onvariabletrue] [Namedbrick] [ARENA] [setplayertransform] [ ] [ ] [3] [onvariabletrue] [Self] [disappear] [-1] [4] [Onvariabletrue] [Self] [VCE_Modvariable] [players] [set] [0] [5] [onminigamekill] [self] [VCE_Ifvariable] [kills] [>=] [9] [6 [6] [onvariablefalse] [self] [VCE_Modvariable] [kills] [add] [1] [7] [onvariabletrue] [Self] [disappear] [0] [8] [onvariabletrue] [Self] [VCE_Modvariable] [kills] [set] [0] I'm still unsure of the minigame event comparability with VCE because I know of a few discrepancies, so these may or may not work. Also, this was just a base for the system. It is very basic. Please don't just use this if it works, add some pizzazz and prettiness. |
| Evar678:
Gen, I dont believe this is what he is talking about. Also, vce works just fine with any input event. Why wouldnt it? And, ftr, using code tags with events helps tremendously. --- Code: ---[0] OnMinigameSpawn Self vce_ifVariable Players < 10 1 3 [1] OnVariableTrue Self vce_ModVariable Players add 1 [2] OnVariableTrue nb_Arena1 setPlayerTransform [3] OnVariableFalse nb_Arena2 setPlayerTransform [4] OnMinigameKill KillerClient vce_ifVariable Kills < 25 --- End code --- Thats how the arena thing would work. However, VCE input events lack a KillerClient target. Gen your events would end the minigame after there were 10 total kills, because the variable is managed within the brick itself. The correct way to do this would be to instead have the KillerClient handle the variable, and then have the brick do a check onMinigameKill. Resetting the minigame via points would be done like so: --- Code: ---[0] OnMinigameKill KillerClient vce_ifValue <var:cl:score> == 10 1 2 [1] OnVariableTrue Minigame messageAll Somebody has won the game! Resetting minigame! [2] OnVariableTrue Minigame Reset --- End code --- Hope this helps. I wrote this from my kindle fire, so, any typos / errors, sorry. |
| Night Fox:
set the player limit to 10, and put ten spawns in the arena |
| Billyjack2012:
Yes, but you have to have all these events installed, since a few of them (like setPlayerTransform) are addons. Hothauser appears to be using 2 event mods: Variable Conditional Events (VCE) setPlayerTransform Hope I helped maybe a little. :) |
| Navigation |
| Message Index |
| Next page |