ID:2031929
Feb 6 2016, 11:20 pm
|
|
So I don't even know where to begin with this really. I need to save and load two mobs controlled by a user at a time from a save file. The way the game is setup the user controls two heroes that just follows the lead (whichever the user has their key attached to) and the user has a verb that swaps between the active and inactive one. But I need both the mobs to be saved within a file and loaded up.
|
I have the swapping mechanic already in place and it works wonders. Ill try what you suggested with the load and saves right now.
|
To save a datum to a savefile:
To load a datum from a savefile:
Swapping between mobs is slightly tricky.
When any of those 3 statements are executed, the BYOND engine will call a.Logout() and b.Login(), so make sure that you don't have any titlescreen stuff in either of those. That stuff should go under a different type of mob entirely. Also, don't delete either mob on logout, of course. If you want to do things when a client connects to or disconnects from the game, do it in client/New() (after . = ..()) and client/Del() (before ..()).