Author Topic: Brick Spawn Script  (Read 1643 times)

That should work. Try it.
YES! It does work!  when I press Ctrl and K to die after I did spawned was under the brick spawn and drop long way down, how I can adjust position put player top at the brick spawn?

YES! It does work!  when I press Ctrl and K to die after I did spawned was under the brick spawn and drop long way down, how I can adjust position put player top at the brick spawn?

Code: [Select]
package NewSpawn
{
    function fxDtsBrick::getSpawnpoint(%brick)
    {
        %trans = Parent::getSpawnpoint(%brick);
        if(%brick.getDatablock().getID() == brickNewSpawnData.getID())
        { return vectorAdd(%trans, "0 0 1.2") SPC getWords(%trans, 3, 6); }
        else return %trans;
    }
};
activatePackage("NewSpawn");

That should work.
« Last Edit: June 24, 2013, 11:39:51 PM by Xalos »

Code: [Select]
package NewSpawn
{
    function fxDtsBrick::getSpawnpoint(%brick)
    {
        %trans = Parent::getSpawnpoint(%brick);
        if(%brick.getDatablock().getID() == brickNewSpawnData.getID())
        { return vectorAdd(%trans, "0 0 1.2") SPC getWords(%trans, 3, 6); }
        else return %trans;
    }
};
activatePackage("NewSpawn");

That should work.

Code: [Select]
datablock fxDTSBrickData (brick4xOctagonSpawnData : brickSpawnPointData)
{
   brickFile = "Add-Ons/Brick_Revloution_Spawn/4xOctagonSpawn.blb";

   specialBrickType = "Brick Spawn";

   orientationFix = 1;

   canCover = false;

   category = "Special";
   subCategory = "Revloution Spawn";
   uiName = "4 x Octagon";
   iconName = "Add-Ons/Brick_Revloution_Spawn/4xOctagon";

   indestructable = true;
};

function brick4xOctagonSpawnData::onPlant(%data, %brick)
{
    brickSpawnpointData::onPlant(%data, %brick);
}

function brick4xOctagonSpawnData::onLoadPlant(%data, %brick)
{
    brickSpawnpointData::onLoadPlant(%data, %brick);
}

package NewSpawn
{
    function fxDtsBrick::getSpawnpoint(%brick)
    {
        %trans = Parent::getSpawnpoint(%brick);
        if(%brick.getDatablock().getID() == brickNewSpawnData.getID())
        { return vectorAdd(%trans, "0 0 1.2") SPC getWords(%trans, 3, 6); }
        else return %trans;
    }
};
activatePackage("NewSpawn");

I did changed to  return vectorAdd(%trans, "0 0 5.2") are same result as spawn under the floor and drop long way down to bottomless.

Then you may just be stuck always making the spawnpoint bricks be 3x3x15 in size. Sorry.

I did changed to  return vectorAdd(%trans, "0 0 5.2") are same result as spawn under the floor and drop long way down to bottomless.

In the code Xalos gave you, you need to change brickNewSpawnData to the name of your datablock.

In the code Xalos gave you, you need to change brickNewSpawnData to the name of your datablock.

Did not catch that. Nice one, Eagle Eyes :P

In the code Xalos gave you, you need to change brickNewSpawnData to the name of your datablock.
each datablock or not? If i made more than 7 new brick, I have write 7 new datablock?
http://forum.blockland.us/index.php?topic=235110.0 more details.

each datablock or not? If i made more than 7 new brick, I have write 7 new datablock?

Code: [Select]
package FurlingsSpawns
{
    function fxDtsBrick::getSpawnpoint(%brick)
    {
        %trans = Parent::getSpawnpoint(%brick);
        %data = %brick.getDatablock().getID();
        if(%data == brickSpawn1Data.getID() || %data == brickSpawn2Data.getID() ||
            %data == brickSpawn3Data.getID() || %data == brickSpawn4Data.getID())
        { return vectorAdd(%trans, "0 0 1.2") SPC getWords(%trans, 3, 6); }
        return %trans;
    }
};
activatePackage("FurlingsSpawns");

Code: [Select]
package FurlingsSpawns
{
    function fxDtsBrick::getSpawnpoint(%brick)
    {
        %trans = Parent::getSpawnpoint(%brick);
        %data = %brick.getDatablock().getID();
        if(%data == brickSpawn1Data.getID() || %data == brickSpawn2Data.getID() ||
            %data == brickSpawn3Data.getID() || %data == brickSpawn4Data.getID())
        { return vectorAdd(%trans, "0 0 1.2") SPC getWords(%trans, 3, 6); }
        return %trans;
    }
};
activatePackage("FurlingsSpawns");
I understood!

EDIT: I was test again.. same result.

Code: [Select]
datablock fxDTSBrickData (brick4xOctagonSpawnData : brickSpawnPointData)
{
   brickFile = "Add-Ons/Brick_Revloution_Spawn/4xOctagonSpawn.blb";

   specialBrickType = "Brick Spawn";

   orientationFix = 1;

   canCover = false;

   category = "Special";
   subCategory = "Revloution Spawn";
   uiName = "4 x Octagon";
   iconName = "Add-Ons/Brick_Revloution_Spawn/4xOctagon";

   indestructable = true;
};

function brick4xOctagonSpawnData::onPlant(%data, %brick)
{
    brickSpawnpointData::onPlant(%data, %brick);
}

function brick4xOctagonSpawnData::onLoadPlant(%data, %brick)
{
    brickSpawnpointData::onLoadPlant(%data, %brick);
}

package brick4xOctagonSpawns
{
    function fxDtsBrick::getSpawnpoint(%brick)
    {
        %trans = Parent::getSpawnpoint(%brick);
        if(%brick.getDatablock().getID() == brickNewSpawnData.getID())
        { return vectorAdd(%trans, "0 0 1.2") SPC getWords(%trans, 3, 6); }
        else return %trans;
    }
};
activatePackage("brick4xOctagonSpawns");
If you want me sent to you get this add-on package or not?
« Last Edit: June 25, 2013, 12:41:01 AM by Furling² »

...you still haven't replaced the datablock name with the name of your datablock :v

...you still haven't replaced the datablock name with the name of your datablock :v
stuff. I will replace them later. I am not sure which one I will replace them. I am an idiots and still learn write script.

The one where it says brickNewSpawnData? :v