Author Topic: VCE loops cease to function upon respawn  (Read 1906 times)

I'm doing some work with VCE in single player and I'm finding that all event loops seem to stop upon death (regardless of cause). I found a similar issue reported here, but there was no resolution in the thread. Since I'm playing alone I haven't verified whether this is strictly on host death or not like the other thread determined, but I imagine there must be some sort of workaround (or I could be doing something wrong), otherwise this makes VCE pretty much useless.

To clarify, I'm only using brick-targeted events - there are no player/client targeted events in the loops. I have a trigger brick that, when activated, sets off a chain (strictly via VCE, not relays) with onVariableUpdate and modVariable in a separate controller brick, which performs a loop that triggers some explosion/emitter events on a number of named bricks.

I don't think posting my events will help but I can certainly do so if this is unnatural behavior for VCE and it seems like the error is on my part. I'm no stranger to events but I'll admit that I'm not very familiar with VCE itself.


im p sure it has something to do with the spawn protection in bl. in my experience it only stops working for the first 5 seconds or so after respawning then it's back to normal

im p sure it has something to do with the spawn protection in bl. in my experience it only stops working for the first 5 seconds or so after respawning then it's back to normal

The problem with that is that there are no events that reference the player/client in this loop. Setting up a non VCE loop with just vanilla relays won't cause it to break on death. There's a 1-2 second invulnerably to onPlayerTouch built into Blockland but that's not coming into play here.

im p sure it has something to do with the spawn protection in bl. in my experience it only stops working for the first 5 seconds or so after respawning then it's back to normal

It looks like you weren't too far off. VCE has had a 5-second spawn invulnerably since version 5.23 - I disabled this (I was looking to do this anyway) and bizarrely, my issue was fixed. I'm willing to chalk this up to being some sort of bug regardless.

If anyone is looking to fix this issue, it's as simple as unzipping VCE's add-on folder, entering the server folder, opening up outputs.cs, and finding the following line (line 7):

$VCE::Server::ImmuneTime = 5000;

Just change that 5000 to whatever number you'd like (1000 = 1 second) and you're good to go. I've set it to 0 since I don't allow others to use events on my server anyway so there's no opportunity for abuse, but obviously change this at your own risk (though you can make spawn traps with vanilla events just fine, so there's not much point worrying about this in the first place).

I've been having similar issues with VCE on my server as well. My ship utilizes advanced VCE computer systems and every time i'd respawn from dying almost everything would break. Thanks!

It looks like you weren't too far off. VCE has had a 5-second spawn invulnerably since version 5.23 - I disabled this (I was looking to do this anyway) and bizarrely, my issue was fixed. I'm willing to chalk this up to being some sort of bug regardless.
I don't think things added as features are bugs
it was added to try and stop people from abusing VCE on others and just killing them with a loop
(it's not very effective, but it's still a feature that was added)

$VCE::Server::ImmuneTime = 5000;
Along with this command, if you plan on adding your events into a packaged gamemode, VCE doesn't like to initially load with the gamemode save. So to get it to work in a gamemode its a simple fix of cleaning all bricks and reloading the save manually after applying the command.