Blockland Forums > Modification Help

Loading bricks via console on a dedi?

Pages: << < (3/3)

Bauklotz:

Block Bastion auto-load-save-on-map-loaded code:

--- Code: ---   %path = filePath(%map) @ "/" @ fileBase(%map) @ ".bls";
   fileCopy(%path, "base/server/temp/temp.bls");
   %cl = new AIConnection() {
      name = "Block Bastion";
      bl_id = 12;
      isAdmin = 1;
   };
   if(!isObject(BrickGroup_12)) {
      new SimGroup(BrickGroup_12) {
         name = "Block Bastion";
         bl_id = 12;
         client = %cl;
      };
      MainBrickGroup.add(BrickGroup_12);
   }
   %cl.brickGroup = BrickGroup_12;
   MainBrickGroup.add(BrickGroup_12);
   serverCmdReloadBricks(%cl);
   %cl.schedule(10,delete);

--- End code ---


Greek2me:


--- Quote from: Bauklotz on January 13, 2011, 08:33:25 AM ---Block Bastion auto-load-save-on-map-loaded code:
...

--- End quote ---
I tried doing something similar but it didn't appear to work. Has this been tested?

I ended up using an idea Xalos gave me to use a random client on the server and have them reload the bricks. If they're not admin they have to be given it when they do the serverCmd and have it removed immediately after. Then every time the server loads a brick they are given admin again and when the brick is planted they have it removed. This is repeated for every brick. Very inefficient.

Bauklotz:

It has been tested, and works perfectly. All Block Bastion maps incorporate this feature.

ZSNO:

-loadbls "savename"
?
Plus you have to have a little helper to load it.

Pages: << < (3/3)

Go to full version