Author Topic: Issue with VCE, BL_ID variable does not save when the server resets  (Read 171 times)

I'm not that experienced with VCE but I'm trying to allow a player to buy a door and only allow them access to it.

So far this works, only the owner (through events) after purchasing it can open.

The problem is that the variable resets when the server resets. I want the variable to stay until I reset it manually. I can't figure it out




Now I do have a custom event system for doors by the way. Called "MorDoor" where I can manually set someone's ID to a door, the problem is I have to manually set it instead of the event being applied automatically when they buy it. This will cause frustration for admin staff down the line until I find a way to have it automatic.



So if the above complicated variable solution cannot be done, is it possible to edit this event to allow an ID to be automatically added when they buy the door?

Wow, that looks like a mess.  A buyDoor event which modifies doorRestrict events would clean things up quite nicely.
...

Or, you could use the brick name to store the BLID.
VCE_modValue > <var:br:name> == <var:cl:bl_id>
That would tie up the brick name, but at least the ownership would save with the bricks.

Wow, that looks like a mess.  A buyDoor event which modifies doorRestrict events would clean things up quite nicely.

I can give you guys my doorrestrict add-on if you can figure out how to set that up.

That would tie up the brick name, but at least the ownership would save with the bricks.

I'm sorry I didn't mean that kind of ownership.

I still want to retain full 100% brick ownership.

I just want them to be able to buy a door only they have access to. I just meant "ownership" as in they have access to something no one else has access to.

...I guess I should've said BLID instead of ownership.
Lemee try that again
That would tie up the brick name, but at least the buyer's BLID would save with the bricks.

The door buyer's BLID would be saved in the brick name field.  Then if you ever want to check if the person trying to open the door should be able to, you can compare <var:br:name> to <var:cl:bl_id>.


...uh...  for $10 I would create a buyDoor event for you.

i think it's possible to assign a player's BLID to a brick door in a way that allows them alone to access it after a server reset by using colored bricks to store memory values.

Of course you can easily set the door to open only for a specific player using vce but you'd have to do the initial setup manually for each player when they first purchase. Either set it so it does a retrocheck for a password (iflastplayermsg) or have it check their player name or BLID.

someone helped me out with it, it's just really long complicated VCE events.