Author Topic: VCE Help, Saving variables  (Read 717 times)

Hello, I've been trying to find a way, through VCE, to make it so that player's Gold value will save either when the player leaves the server, or left clicks on a brick/bot. If anyone knows how to do either, any help would be greatly appreciated.

Thank you for your time.

there should be some events for saving as a separate addon

doing it on leave would probably require a custom addon to do, as events can't do that well

there should be some events for saving as a separate addon

doing it on leave would probably require a custom addon to do, as events can't do that well
No

VCE already has saveVariable and loadVariable events built in

neat, but saving on leave?

neat, but saving on leave?
Just save it when you change it and you're set.

Don't know any add-on that stores variables on leave right now

besides maybe tying it into player persistence
since it sounds like that would be helpful for the type of server being hosted

I'm not sure if it would work, but:

OnMiniGameLeave - self - savevariable - client [blah]
OnMiniGameJoin - self - loadvariable - client [blah]

It might register the save variable, AFTER the player leaves, so it wouldn't save anything, because there is no client / player to save from. If that is so, I would suggest save / load points around the map or whatever.

Thank you for your help everyone, i'll try these solutions out. I'm sure at least one of these will work.

Thanks again, locking.