Thread: Creating Walls

Results 1 to 13 of 13
  1. #1
    DEREK TROTTER's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    37
    Reputation
    10
    Thanks
    203
    My Mood
    Hungover

    Creating Walls

    ok i have this code exact

    Code:
    CreateWalls(start, end) 
    { 
            D = Distance((start[0], start[1], 0), (end[0], end[1], 0)); 
            H = Distance((0, 0, start[2]), (0, 0, end[2])); 
            blocks = roundUp(D/55); 
            height = roundUp(H/30); 
            CX = end[0] - start[0]; 
            CY = end[1] - start[1]; 
            CZ = end[2] - start[2]; 
            XA = (CX/blocks); 
            YA = (CY/blocks); 
            ZA = (CZ/height); 
            TXA = (XA/4); 
            TYA = (YA/4); 
            Temp = VectorToAngles(end - start); 
            Angle = (0, Temp[1], 90); 
            for(h = 0; h < height; h++){ 
                    block = spawn("script_model", (start + (TXA, TYA, 10) + ((0, 0, ZA) * h))); 
                    block setModel("com_plasticcase_friendly"); 
                    block.angles = Angle; 
                    block Solid(); 
                    block CloneBrushmodelToScriptmodel( level.airDropCrateCollision ); 
                    wait 0.001; 
                    for(i = 1; i < blocks; i++){ 
                            block = spawn("script_model", (start + ((XA, YA, 0) * i) + (0, 0, 10) + ((0, 0, ZA) * h))); 
                            block setModel("com_plasticcase_friendly"); 
                            block.angles = Angle; 
                            block Solid(); 
                            block CloneBrushmodelToScriptmodel( level.airDropCrateCollision ); 
                            wait 0.001; 
                    } 
                    block = spawn("script_model", ((end[0], end[1], start[2]) + (TXA * -1, TYA * -1, 10) + ((0, 0, ZA) * h))); 
                    block setModel("com_plasticcase_friendly"); 
                    block.angles = Angle; 
                    block Solid(); 
                    block CloneBrushmodelToScriptmodel( level.airDropCrateCollision ); 
                    wait 0.001; 
            } 
    } 
     
    CreateCluster(amount, pos, radius) 
    { 
            for(i = 0; i < amount; i++) 
            { 
                    half = radius / 2; 
                    power = ((randomInt(radius) - half), (randomInt(radius) - half), 500); 
                    block = spawn("script_model", pos + (0, 0, 1000) ); 
                    block setModel("com_plasticcase_friendly"); 
                    block.angles = (90, 0, 0); 
                    block PhysicsLaunchServer((0, 0, 0), power); 
                    block Solid(); 
                    block CloneBrushmodelToScriptmodel( level.airDropCrateCollision ); 
                    block thread ResetCluster(pos, radius); 
                    wait 0.05; 
            } 
    }
    but when trying to create a wall, get unknown function

    am i missing anything?

  2. #2
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    This is it, to create a wall:

    CreateWalls((x,y,z),(x,y,z));

    Code:
    CreateWalls(start, end)
    {
    	D = Distance((start[0], start[1], 0), (end[0], end[1], 0));
    	H = Distance((0, 0, start[2]), (0, 0, end[2]));
    	blocks = roundUp(D/55);
    	height = roundUp(H/30);
    	CX = end[0] - start[0];
    	CY = end[1] - start[1];
    	CZ = end[2] - start[2];
    	XA = (CX/blocks);
    	YA = (CY/blocks);
    	ZA = (CZ/height);
    	TXA = (XA/4);
    	TYA = (YA/4);
    	Temp = VectorToAngles(end - start);
    	Angle = (0, Temp[1], 90);
    	for(h = 0; h < height; h++){
    		block = spawn("script_model", (start + (TXA, TYA, 10) + ((0, 0, ZA) * h)));
    		block setModel("com_plasticcase_friendly");
    		block.angles = Angle;
    		block Solid();
    		block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    		wait 0.001;
    		for(i = 1; i < blocks; i++){
    			block = spawn("script_model", (start + ((XA, YA, 0) * i) + (0, 0, 10) + ((0, 0, ZA) * h)));
    			block setModel("com_plasticcase_friendly");
    			block.angles = Angle;
    			block Solid();
    			block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    			wait 0.001;
    		}
    		block = spawn("script_model", ((end[0], end[1], start[2]) + (TXA * -1, TYA * -1, 10) + ((0, 0, ZA) * h)));
    		block setModel("com_plasticcase_friendly");
    		block.angles = Angle;
    		block Solid();
    		block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    		wait 0.001;
    	}
    }

  3. #3
    DEREK TROTTER's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    37
    Reputation
    10
    Thanks
    203
    My Mood
    Hungover
    Quote Originally Posted by Yamato View Post
    This is it, to create a wall:
    yes, exactly what i posted up there ^^^

    but i get unknown function

  4. #4
    foasdgg's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    83
    Reputation
    9
    Thanks
    37
    what did u do with that?
    just put it on _rank?

  5. #5
    Boon Pek's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    188
    Reputation
    10
    Thanks
    378
    My Mood
    Inspired
    Add the function "roundUp()" located in MapEdit
    My minecraft launcher!

    A full-featured, actively-developed windows-only Minecraft Launcher! It allows you to download older versions of minecraft.jar through the options menu, multi-username support, RAM allocation support, non-legit logins and more!











  6. #6
    foasdgg's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    83
    Reputation
    9
    Thanks
    37
    and also ResetCluster(pos, radius)

  7. #7
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    Quote Originally Posted by foasdgg View Post
    and also ResetCluster(pos, radius)
    That is for clusters, not for walls, I think, :P

  8. #8
    foasdgg's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    83
    Reputation
    9
    Thanks
    37
    Quote Originally Posted by Yamato View Post
    That is for clusters, not for walls, I think, :P
    as you can see he added
    CreateCluster(amount, pos, radius)
    {
    for(i = 0; i < amount; i++)
    {
    half = radius / 2;
    power = ((randomInt(radius) - half), (randomInt(radius) - half), 500);
    block = spawn("script_model", pos + (0, 0, 1000) );
    block setModel("com_plasticcase_friendly");
    block.angles = (90, 0, 0);
    block PhysicsLaunchServer((0, 0, 0), power);
    block Solid();
    block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    block thread ResetCluster(pos, radius);
    wait 0.05;
    }
    }

    :\

  9. #9
    EpicPlayer's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    628
    Reputation
    13
    Thanks
    155
    Weird answers here O_O

    But oh well, are you using a normal _mapedit.gsc or you making a "new" one or somenthing else? xD

    Since the door requires Doorthink, and DoorReset thread

  10. #10
    foasdgg's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    83
    Reputation
    9
    Thanks
    37
    Quote Originally Posted by EpicPlayer View Post
    Weird answers here O_O

    But oh well, are you using a normal _mapedit.gsc or you making a "new" one or somenthing else? xD

    Since the door requires Doorthink, and DoorReset thread
    DOOR???
    wtf

  11. #11
    ~Just IN~'s Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    self thread xbox360nolife() {
    Posts
    518
    Reputation
    11
    Thanks
    52
    My Mood
    Doh
    Quote Originally Posted by foasdgg View Post
    DOOR???
    wtf
    Yes.. a door.. You can make a door if a player hits E or 5 or w/e key you want. It can open/close in all directions. Up, down, left, right, diagonal, anyway.

  12. #12
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    just post ur whole mapedit here and we can look better

  13. #13
    foasdgg's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    83
    Reputation
    9
    Thanks
    37
    Quote Originally Posted by ~Just IN~ View Post


    Yes.. a door.. You can make a door if a player hits E or 5 or w/e key you want. It can open/close in all directions. Up, down, left, right, diagonal, anyway.
    are you stupid?
    he talked about walls, and this dude came and start talking about doors...