Sounds awesome.
function orecluster(%brick){ echo("Ore gem cluster made"); initContainerBoxSearch(%brick.getWorldBoxCenter(), 10, $typeMasks::fxDTSBrickObjectType); while(isObject(%orebrick = containerSearchNext())){ if(%brick.colorID > 0 && %brick.getcolorID < 5 && getRandom(1,2) == 1){%orebrick.setColor(%brick.colorID); echo("Ore cluster made");} if(%brick.colorID > 4 && %brick.getcolorID < 9 && getRandom(1,3) == 1){%orebrick.setColor(%brick.colorID); echo("Gem cluster made");} }}
I was going to PM you until I found I can't send PM's any more.
-code-More importantly, keep up the good work Truce.
initContainerBoxSearch(%brick.getWorldBoxCenter(), 10, $typeMasks::fxDTSBrickObjectType);
%brick.getcolorID
getRandom(1,2)
Nix told me to replace %brick.colorID with %brick.getColorID ):
class fxDTSBrick : public SceneObject { public: virtual int getDestructionVolume() {} virtual bool canExplode(maxVolume, maxFloatingVolume) {} virtual int getAngleID() {} virtual int getColorID() {} virtual int getPrintID() {} virtual int getColorFxID() {} virtual int getShapeFxID() {} virtual bool isBasePlate() {} virtual bool isPlanted() {} virtual bool isDead() {} virtual bool isFakeDead() {} virtual int getFakeDeadTime() {} /*! Returns number of bricks in downlist. */ virtual int getNumDownBricks() {} /*! Returns up brick at given index. */ virtual int getDownBrick(int index) {} /*! Returns number of bricks in downlist. */ virtual int getNumUpBricks() {} /*! Returns up brick at given index. */ virtual int getUpBrick(int index) {} /*! sets isTrusted value */ virtual void setTrusted(bool val) {} virtual bool setDatablock(datablock) {} virtual void setColor(int color) {} virtual void setColorFX(int colorFxID) {} virtual void setShapeFX(int shapeFxID) {} virtual void setPrint(int printID) {} virtual int plant() {} /*! Returns number of connections away from the ground */ virtual int getDistanceFromGround() {} /*! Returns true if brick is attached to a baseplate. */ virtual bool hasPathToGround() {} /*! Returns true if brick is attached to a baseplate (considers blown-up bricks to be dead). */ virtual bool hasFakePathToGround() {} /*! Return the datablock this fxBrickDB is using. */ virtual int getDataBlock() {} /*! Dumps the upbrick list. */ virtual void dumpUpList() {} /*! Dumps the upbrick list. */ virtual void dumpDownList() {} /*! exposed = no bricks attached to one end */ virtual bool iloveposed() {} /*! removes brick and any floating children */ virtual void killBrick() {} virtual void setColliding(bool val) {} virtual bool isColliding() {} virtual void setRendering(bool val) {} virtual bool isRendering() {} virtual void setRayCasting(bool val) {} virtual bool isRayCasting() {} virtual int getExposedAreaTop() {} virtual int getExposedAreaBottom() {} virtual int getExposedAreaNorth() {} virtual int getExposedAreaSouth() {} virtual int getExposedAreaEast() {} virtual int getExposedAreaWest() {} virtual int getLightId() {} /*! returns true if killing this brick will cause others to fall */ virtual bool willCauseChainKill() {} /*! @name Transform @{ */ /*! */ MatrixPosition position; /*! */ MatrixRotation rotation; /*! */ Point3F scale; /// @} /*! @name fxDTSBrick Stuff @{ */ /*! */ GameBaseDataPtr dataBlock; /*! */ int angleID; /*! */ int colorID; /*! */ int printID; /*! */ int colorFxID; /*! */ int shapeFxID; /*! */ bool isBasePlate; /*! */ bool isPlanted; /// @}};
$Mine_brick[%x,%y,%z]="sand";
:ooooFor landscapes:Emulate the "infinite mining" trick, set up an array with brick data.$Mine_brick[%x,%y,%z]="sand";etc.When they mine, the bricks below are revealed, thus allowing for a large landscape with minimal initial brick usage.