Author Topic: phflack's thread of questions  (Read 1456 times)

I was unaware that baseplates could be floating
They can't
Code: [Select]
package floatingBricks
{
    function fxDTSBrick::isBaseplate(%brick)
    {
        if(%brick.isFloatingBaseplate)
            return true;
        else
            return parent::isBaseplate(%brick)
    }
   
    function secretFloatPlanting()
    {
        //wont tell you how to actually do it, on the forums
        //after the brick has been planted in the air...
        if(%brick.getNumUpBricks() + %brick.getNumDownBricks() == 0)
            %brick.isFloatingBaseplate = true;
    }
};
activatePackage(floatingBricks);
This makes it so the first brick that has been planted that doesn't touch any other bricks to become a psuedo-baseplate

Lug, did you change your name?

oh
and does anyone notice anything different about me
i got my 1206 surgically removed by badspot :)

he so nice

My name is pretty stupid, I wish I could change it.
Try a message asking Badspot to do it. He changed mine from xC a long time ago.
he removed the numbers from the end of mine a few days ago, all i had to do was ask nicely

phlack, here's my suggestion: package isBaseplate (I think it's a function) and have certain floating bricks act as baseplates, set them to a variable and have isBaseplate return true.
%brick.isBaseplate is a variable/tagged field i think, %brick.dump();?
« Last Edit: June 22, 2012, 04:18:03 PM by Lugnut »

%brick.isBaseplate is a variable/tagged field i think, %brick.dump();?
that's even easier then, set it to true if it's a psuedo-baseplate

do you guys understand what I'm asking?
it seems that you guys think that I want to turn a brick into a baseplate
I actualy want to make a floating brick that acts as if it is grounded, so wanding something on it won't break it
I thought the OP was clear enough

do you guys understand what I'm asking?
it seems that you guys think that I want to turn a brick into a baseplate
I actualy want to make a floating brick that acts as if it is grounded, so wanding something on it won't break it
I thought the OP was clear enough
Setting a brick as a baseplate effectively grounds it. If it doesn't work, then you might need to rewrite .getDistanceFromGround()

problem, i was trying to modify the function, but "ERROR: function declaration failed: fxDTSBrick::getDistanceFromGround"
can i modify it on a per brick type basis instead of global? i was just testing with a brick ID
also, aparently if the brick is floating it returns 2147483647, i'm guessing 2^N - 1?

edit:
testing stuff
Code: [Select]
datablock fxDTSBrickData(DuckBrickData : brick4x4FData)
{
category = "Special";
subCategory = "Misc";
uiName = "DUCKS GO QUACK";
}
function DuckBrickData::getDistanceFromGround(%brick, %a, %b, %c)
{
return 0;
}
it says it has a syntax error, what did i do wrong?
line 7, "...function ##D##uckBrickData..."
copied the stuff from city RP, couldn't find any other examples with brick making + functions
(JVS is rather scattered it seems, and i can't find the older versions in my files)
« Last Edit: June 22, 2012, 07:52:05 PM by phflack »

problem, i was trying to modify the function, but "ERROR: function declaration failed: fxDTSBrick::getDistanceFromGround"
can i modify it on a per brick type basis instead of global? i was just testing with a brick ID
also, aparently if the brick is floating it returns 2147483647, i'm guessing 2^N - 1?
You could try .hasPathToGround(), but you probably can't package that either

it's not a function, just tried with isfunction();
but what's the syntax error?

the datablock's } has to be };


it's not a function, just tried with isfunction();
but what's the syntax error?
datablocks need a semicolon on the last bracket, like packages
Use this:
Code: [Select]
if(!isObject(brickBuildZone64xData))
{
datablock fxDTSBrickData(brickBuildZone64xData : brick64xCubeData)
{
category = "Special";
subCategory = "Zones";
uiName = "Build Zone 64x";
isBuildZone = true;
isWaterBrick = true;
alwaysShowWireFrame = false;
};
}
The obj checks are so it doesn't add duplicate datablocks when you execute code multiple times.

hmm, turns out the specific brick function didn't work
ERROR: function declaration failed: DuckBrickData:getDistanceFromGround

hmm, turns out the specific brick function didn't work
ERROR: function declaration failed: DuckBrickData:getDistanceFromGround
I don't think you can overwrite it. If worst comes to worst, you'll have to rewrite onRemove to work every time unless floating bricks.

:o
just did trace while breaking something, and ontoolbreak is in there heh
i thought it was completely removed so long ago, but i guess just the part on the events GUI was

:o
just did trace while breaking something, and ontoolbreak is in there heh
i thought it was completely removed so long ago, but i guess just the part on the events GUI was
Well stuff
That explains why I couldn't find it on the events GUI yesterday...