Author Topic: Ghost Bricks || Moving and Planting [SOLVED]  (Read 1449 times)



In any case, if you're creating them manually then can't you just place them in the position they're needed instead of shifting them?

Ok Ok, that piece of script I posted was just my prototype of the big picture. I'm really making an output event for this, it is so forgeted up though. :(

Code: [Select]
registerOutputEvent(fxDtsBrick, "MoveBrick", vector);

function fxDtsBrick::MoveBrick(%this, %c)
{
%loltisabrick = new fxDtsBrick()
{
position = %this.position;
rotation = %this.rotation;
angleID = %this.angleID;
colorID = %this.oldcolorID;
colorFXID = %this.oldcolorFXID;
shapeFXID = %this.shapeFXID;
printID = %this.printID;
dataBlock = %this.dataBlock;
isBasePlate = %this.isBasePlate();
};
%this.delete();
servercmdshiftbrick(%loltisabrick, 0, 0, 3);
%loltisabrick.iplanted = true;
%loltisabrick.plant();
}

Here are my problems:

1. The shifting of the brick and the planting of it will happen at the same time, canceling each other out.

2. It won't plant the brick at all.

3. It won't move the ghost brick at all.

Thank you if you help guys.

Also: I do not need advice on anything else, not the vector, not the other script, nothing besides this.

servercmdShiftBrick must have a client whose player's temp brick is the brick you are trying to move - the circumstances it normally is used in.

If you're creating it at %this.position, can't you just create it at vectorAdd(%this.position,"0 0 0.2") or something?

servercmdShiftBrick must have a client whose player's temp brick is the brick you are trying to move - the circumstances it normally is used in.

If you're creating it at %this.position, can't you just create it at vectorAdd(%this.position,"0 0 0.2") or something?

1. Damnit, I have been trying to call the original brick owner into the script but I can't seem to call it in.

2. ....OK maybe you're right. But I'd still like this to work instead of just taking a shortcut. :(

I love you Space Guy. :3 The whole script works now. Locking.