| Blockland Forums > Modification Help |
| Brick use reduction script. |
| << < (4/17) > >> |
| lordician:
Ooh i was thinking about the possibility of this after some gameplay at trecnh wars stuff. Good idea! :D |
| Demian:
Just add a simple option to ignore evented bricks. So if you have a wall of 1x1 bricks and one of them is evented, the script will leave that brick as is and just join together the rest. |
| johnnyboy:
--- Quote from: Demian on April 16, 2011, 02:59:13 PM ---Just add a simple option to ignore evented bricks. So if you have a wall of 1x1 bricks and one of them is evented, the script will leave that brick as is and just join together the rest. --- End quote --- ^yes |
| DrenDran:
I had a loving great idea to make this a lot easier to make, and a smaller script too... Instead of say making this code over and over again for each brick combo to check for: --- Code: --- if(%northsouth.dataBlock $= "brick1x4Data" && isrot(%brick) && isrot(%northsouth)) { if(getword(%brick.position,1) > getword(%northsouth.position,1)) makebrick("brick1x6Data",addvec(%brick.position,1,-1),%brick.color,0,%brick.client); else makebrick("brick1x6Data",addvec(%brick.position,1,1),%brick.color,0,%brick.client); %brick.delete(); %northsouth.delete(); } if(%eastwest.dataBlock $= "brick1x4Data" && !isrot(%brick) && !isrot(%eastwest)) { if(getword(%brick.position,0) > getword(%eastwest.position,0)) makebrick("brick1x6Data",addvec(%brick.position,0,-1),%brick.color,1,%brick.client); else makebrick("brick1x6Data",addvec(%brick.position,0,1),%brick.color,1,%brick.client); %brick.delete(); %eastwest.delete(); } --- End code --- I could simply loop though a list of things are replace certain feilds there with the correct values, and make a function to add things to the list easily. The result is like this: --- Code: ---addbrickreductioncheck_2dstr("brick1x2Data","brick1x8Data",2,"brick1x10Data"); addbrickreductioncheck_2dstr("brick1x2Data","brick1x6Data",1.5,"brick1x8Data"); addbrickreductioncheck_2dstr("brick1x2Data","brick1x4Data",1,"brick1x6Data"); addbrickreductioncheck_2dstr("brick1x2Data","brick1x2Data",0.5,"brick1x4Data"); addbrickreductioncheck_2dstr("brick1x3Data","brick1x3Data",0.75,"brick1x6Data"); addbrickreductioncheck_2dstr("brick1x4Data","brick1x4Data",1,"brick1x8Data"); addbrickreductioncheck_2dstr("brick1x6Data","brick1x6Data",1.5,"brick1x12Data"); addbrickreductioncheck_2dstr("brick1x8Data","brick1x8Data",2,"brick1x16Data"); --- End code --- I just made this whole process a hell of a lot easier, and the script a lot smaller. --- Quote from: Demian on April 16, 2011, 02:59:13 PM ---Just add a simple option to ignore evented bricks. So if you have a wall of 1x1 bricks and one of them is evented, the script will leave that brick as is and just join together the rest. --- End quote --- Already done. |
| BlockStar:
Dude your a life saver ive been needed one of these! |
| Navigation |
| Message Index |
| Next page |
| Previous page |