Blockland Forums > Help
Modifying another player's VCE variables?
SectorC:
I am in the middle of making what is effectively a control point using VCE, and would like to know how one would allow the control point to remember the control point's last player owner, and then detract from their currency variable when the control point block is activated by another player.
At the moment it simply grants +2 "Tech" and sets the "T1Used" to 1, so it cannot be used by the same player again.
OnActivate - Client - VCE_IfVariable: (T1Used) = (1)
OnActivate - Client - VCE_modVariable: (T1Used) Set (1)
OnVariableFalse - Client - VCE_modVariable: (Tech) Add (2)
The first problem is that I need to have the block know that the next person is different than the first, preferably using BL_ID.
The second problem is that while the second person gains +2 Tech and has his T1Used set to 1, the first person who used it loses -2 Tech and has his T1Used set to 0.
If it is not possible to do so with VCE alone, but is possible with VCE in tandem with other add-ons I am willing to download a few more to make this work.
Doomonkey:
If you used a second brick here's how you could do it. When you control a brick and auxiliary brick will begin cycling through relays on you. When someone captures the brick after you, it will enable events on your cycle that subtract the necessary variables and also terminate the cycle. After the cycle is terminated for you, it will begin for the new capturer.
Doomonkey:
If you used a second brick here's how you could do it. When you control a brick, an auxiliary brick will begin cycling through relays on you. When someone captures the brick after you, it will enable events on your cycle that subtract the necessary variables and also terminate the cycle. After the cycle is terminated for you, it will begin for the new capturer.
Fixed a typo that might cause some difficulty.
Zeblote:
I'd say it's time that you forget that silly event stuff and look into scripting
SectorC:
--- Quote from: Doomonkey ---If you used a second brick here's how you could do it. When you control a brick, an auxiliary brick will begin cycling through relays on you. When someone captures the brick after you, it will enable events on your cycle that subtract the necessary variables and also terminate the cycle. After the cycle is terminated for you, it will begin for the new capturer.
Fixed a typo that might cause some difficulty.
--- End quote ---
I hadn't thought of that, that's exactly what I would need. Thank you very much.
--- Quote from: Zeblote ---I'd say it's time that you forget that silly event stuff and look into scripting.
--- End quote ---
I'd honestly love to, and I've thought about doing it for some years now. I'll see what I can do.