Blockland Forums > Modification Help
Check when ServerLoadSaveFile_Start is Done AND Loading Events?
Platypi:
--- Quote from: Platypi on November 30, 2017, 07:11:56 PM ---serverDirectSaveFileLoad() works fine. I haven't tried specifying the brickgroup yet, though. Got too tired.
--- End quote ---
I tried specifying $LoadingBricks_BrickGroup = BrickGroup_Test before running serverDirectSaveFileLoad(%file). While the loaded bricks had events (as expected), the function assigned its own value to $LoadingBricks_BrickGroup. So it looks like I need to call ServerLoadSaveFile_Start() directly to use my own brickgroups.
Honestly, I'm considering just creating my own script for loading BLS files. I already have the code for a BLS loader that allows for the rotation of builds. I just need to implement event loading. I'd prefer to use the base functions if I can get away with it, though.
Tendon:
--- Quote from: Platypi on December 01, 2017, 09:11:39 PM ---Honestly, I'm considering just creating my own script for loading BLS files. I already have the code for a BLS loader that allows for the rotation of builds. I just need to implement event loading. I'd prefer to use the base functions if I can get away with it, though.
--- End quote ---
This should help with whatever you're doing.
[BL SOURCE CODE/REFERENCE] ServerLoadSaveFile_Start/Tick/End/Color Data
Mocha:
From the code I posted, it looks like you can package serverLoadSaveFile_Tick and check for if events are being processed through there. Since the last brick is saved to $LastLoadedBrick, you can simply do $specialBrickGroup.add($lastLoadedBrick); to move it to that group if a certain event is processed.
Be very careful about NTNames and spawn point bricks though. Since these usually come before events, you'll have to unregister them on the $LastLoadedBrick's original brickgroup and re-register them on the $specialBrickGroup.
Platypi:
--- Quote from: Tendon on December 03, 2017, 11:52:14 AM ---This should help with whatever you're doing.
[BL SOURCE CODE/REFERENCE] ServerLoadSaveFile_Start/Tick/End/Color Data
--- End quote ---
Oh, nice. This should help me solve my problem. I'll try to post something here if I get it working to my liking.