| Blockland Forums > Modification Help |
| 2x2Cube Print |
| (1/4) > >> |
| soba:
Ok, well, me and my friend have been working on a minecraft brick, however, hes having trouble getting all the bricks to work at once "I place one brick the other deletes, and blockland considers the print bricks to be floating no matter if they are touching any bricks or on the ground" datablock fxDTSBrickData(brickSideFacePrintData) { AlwaysShowWireframe = 1; minecraftbrick = 1; brickFile = "./SideFace.blb"; category = "Special"; subCategory = ""; uiName = ""; iconName = ""; hasPrint = 1; printAspectRatio = "2x2f"; }; datablock fxDTSBrickData(brickTopFacePrintData) { AlwaysShowWireframe = 1; minecraftbrick = 1; brickFile = "./TopFace.blb"; category = "Special"; subCategory = ""; uiName = ""; iconName = ""; hasPrint = 1; printAspectRatio = "2x2f"; }; datablock fxDTSBrickData(brickBottomFacePrintData) { AlwaysShowWireframe = 1; minecraftbrick = 1; brickFile = "./BottomFace.blb"; category = "Special"; subCategory = ""; uiName = ""; iconName = ""; hasPrint = 1; printAspectRatio = "2x2f"; }; datablock fxDTSBrickData(brickMinecraftData) { brickFile = "./main.blb"; category = "Special"; subCategory = "Minecraft"; uiName = "Minecraft Brick"; iconName = ""; }; function FxDTSBrick::CreateMinecraftBrick(%this) { if($MinecraftBrickCount $= "") { $MinecraftBrickCount = 0; } //0 0 -1 90.0002 //1 0 0 0 //0 0 1 90.0002 //30 0 1 180 %ID = $MinecraftBrickCount; for(%i=0;%i<4;%i++) { switch(%i) { case 0: %rot = "0 0 -1 90.0002"; case 1: %rot = "1 0 0 0 "; case 2: %rot = "0 0 1 90.0002"; case 3: %rot = "30 0 1 180"; default: %rot = 0; } %brick = new fxDTSbrick() { minecraftid = %id; minecraftbrick = 1; minecraftside = %i; client=%this.client; dataBlock="brickSideFacePrintData"; isPlanted=1; position=%this.getposition(); rotation=%rot; scale="1 1 1"; colorID = %this.getColorId(); colorFXID = %this.getColorFXId(); printid = %this.client.lastprint2x2f; }; %this.client.brickgroup.add(%brick); %brick.plant(); %brick.setTrusted(1); $Server::BrickCount++; %sides = %sides SPC %brick; } %brick=new fxDTSbrick() { minecraftid = %id; minecraftbrick = 1; minecraftside = %i; client=%this.client; dataBlock="brickTopFacePrintData"; isPlanted=1; position=%this.getposition(); rotation=0; scale="1 1 1"; colorID = %this.getColorId(); colorFXID = %this.getColorFXId(); printid = %this.client.lastprint2x2f; }; %this.client.brickgroup.add(%brick); %brick.plant(); %brick.setTrusted(1); $Server::BrickCount++; %sides = %sides SPC %brick; %brick=new fxDTSbrick() { minecraftid = %id; minecraftbrick = 1; minecraftside = %i; client=%this.client; dataBlock="brickBottomFacePrintData"; isPlanted=1; position=%this.getposition(); rotation=0; scale="1 1 1"; colorID = %this.getColorId(); colorFXID = %this.getColorFXId(); printid = %this.client.lastprint2x2f; }; %sides = %sides SPC %brick; %this.client.brickgroup.add(%brick); %brick.plant(); %brick.setTrusted(1); $Server::BrickCount++; %this.client.undoStack.head--; %this.client.undoStack.val[%this.client.undoStack.head] = %brick TAB "PLANT"; %this.client.undoStack.head++; %this.killbrick(); $MinecraftBricks[%id] = %sides; $MinecraftBrickCount++; } package Minecraft { function brickBottomFacePrintData::onPlant(%this,%obj) { Parent::onPlant(%this,%obj); } function brickTopFacePrintData::onPlant(%this,%obj) { Parent::onPlant(%this,%obj); } function FxDTSBrick::onPlant(%this,%obj) { if(%obj.getdatablock().getname() $= "brickMinecraftData") { %obj.schedule(10,createminecraftbrick); } Parent::onPlant(%this,%obj); } function FxDTSBrick::onDeath(%this,%obj) { if(%obj.getDatablock().minecraftbrick == 1) { %id = %obj.minecraftid; for(%i=0;%i<getWordCount($MinecraftBricks[%id]);%i++) { %brick = getword($Minecraftbricks[%obj.minecraftid],%i); if(isObject(%brick)) { %brick.delete(); } } $Minecraftbrickcount--; } Parent::onDeath(%this,%obj); } function fxDTSBrick::setPrint(%this,%printid) { Parent::setPrint(%brick,%printid); } }; ActivatePackage(Minecraft); |
| DrenDran:
There's already a 2x2 cube print brick, just use that. |
| Pah1023:
--- Quote from: DrenDran on March 16, 2011, 05:40:16 PM ---There's already a 2x2 cube print brick, just use that. --- End quote --- I was thinking to say that, but didn't knew if one exists. |
| soba:
nono, each side is supposed to be a seperate print |
| Iban:
--- Quote from: soba on March 16, 2011, 06:33:51 PM ---nono, each side is supposed to be a seperate print --- End quote --- Cannot be done. |
| Navigation |
| Message Index |
| Next page |