166
General Discussion / Re: What are your best Blockland moments? [Screenshots]
« on: July 30, 2013, 12:33:13 PM »

Heheh botglitch.

there's a cake in there somewhere

2400 blue mininuke projectiles.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.




function shotgunImage::onFire(%this,%obj,%slot)
{
if(%obj.getDamagePercent() < 1.0)
%obj.playThread(2, shiftAway);
Parent::onFire(%this,%obj,%slot);
}Oh no! No one is on blockland because of vacations in the summer and a bunch of people playing their new steam games!
you should work on your grammar
dat logo
Can I only have the brain? I left my filthy meatsack years ago.
uhh what are you talking about
Well if my memory about plant errors doesn't fail me then that'll give you an "Overlap" error if you're too far from the center.Well I couldn't find Out of Range in any of numbers 1-6. So I ended up just using TooFar. It makes sense to use that one.
Maybe try to find one that better suits what you want? I think 4 is "out of range"...
Still, at least don't get the brick's world box 4 times. Save it to a variable and get the individual words of it.Done.
True. Plus the (I think first) group of coords is always the lower one, so he could do something likeI tested it out and that is the case. Added.
Why this?
%pos1x = getWord(%c.player.tempbrick.getWorldBox(), 0);
%pos1y = getWord(%c.player.tempbrick.getWorldBox(), 1);
%pos2x = getWord(%c.player.tempbrick.getWorldBox(), 3);
%pos2y = getWord(%c.player.tempbrick.getWorldBox(), 4);
if(%pos1x > 124 || %pos1x < -124 || %pos1y > 124 || %pos1y < -124 || %pos2x > 124 || %pos2x < -124 || %pos2y > 124 || %pos2y < -124)
Can't you just do something like this?
if(vectorLen(%c.player.tempBrick.position) >= max range goes here)
would also allow large bricks to extend far beyond the bounds that other bricks could reach.this from happening but that's actually extremely useful.
package BrickRangePackage
{
function fxDTSbrick::Plant(%brick)
{
%e = Parent::Plant(%brick);
if(!%e)
{
%c = getbrickgroupfromobject(%brick).client;
if(isObject(%c) && isObject(%c.player) && isObject(%c.player.tempbrick))
{
%worldbox = %c.player.tempbrick.getWorldBox();
%xLow = getWord(%worldbox, 0);
%yLow = getWord(%worldbox, 1);
%xHigh = getWord(%worldbox, 3);
%yHigh = getWord(%worldbox, 4);
if(%xLow < -124 || %yLow < -124 || %xHigh > 124 || %yHigh > 124)
{
messageClient(%c, 'MsgPlantError_TooFar');
return 7;
}
else
{
return false;
}
}
}
}
};
ActivatePackage(BrickRangePackage);
package BrickRangePackage
{
function fxDTSbrick::Plant(%brick)
{
%e = Parent::Plant(%brick);
if(!%e)
{
%c = getbrickgroupfromobject(%brick).client;
if(isObject(%c) && isObject(%c.player) && isObject(%c.player.tempbrick))
{
%pos1x = getWord(%c.player.tempbrick.getWorldBox(), 0);
%pos1y = getWord(%c.player.tempbrick.getWorldBox(), 1);
%pos2x = getWord(%c.player.tempbrick.getWorldBox(), 3);
%pos2y = getWord(%c.player.tempbrick.getWorldBox(), 4);
if(%pos1x > 124 || %pos1x < -124 || %pos1y > 124 || %pos1y < -124 || %pos2x > 124 || %pos2x < -124 || %pos2y > 124 || %pos2y < -124)
{
commandtoclient(%c,'centerprint',"\c6Too far - Build closer to the center.",2);
return true;
}
else
{
return false;
}
}
}
}
};
ActivatePackage(BrickRangePackage);Just use the old Blender?
Make your model in 2.6 or whatever then export to .3ds (This is how I would do it, I'm not sure how 2.49 reads newer blender files)
package BrickRangePackage
{
function fxDTSbrick::Plant(%brick)
{
%e = Parent::Plant(%brick);
if(!%e)
{
%c = getbrickgroupfromobject(%brick).client;
if(isObject(%c) && isObject(%c.player) && isObject(%c.player.tempbrick))
{
%pos1x = getWord(%c.player.tempbrick.getWorldBox(), 0);
%pos1y = getWord(%c.player.tempbrick.getWorldBox(), 1);
%pos2x = getWord(%c.player.tempbrick.getWorldBox(), 3);
%pos2y = getWord(%c.player.tempbrick.getWorldBox(), 4);
if(%pos1x > 124 || %pos1x < -124 || %pos1y > 124 || %pos1y < -124 || %pos2x > 124 || %pos2x < -124 || %pos2y > 124 || %pos2y < -124)
{
commandtoclient(%c,'centerprint',"\c6Too far - Build closer to the center.",2);
%brick.schedule(0, "delete");
if($debug)
{
echo("Return is true.");
}
}
if($debug)
{
echo(%c SPC %brick SPC %pos1x SPC %pos1y SPC %pos2x SPC %pos2y);
}
}
}
}
};
ActivatePackage(BrickRangePackage);package BrickRangePackage
{
function fxDTSbrick::Plant(%brick)
{
%e = Parent::Plant(%brick);
if(!%e)
{
%c = getbrickgroupfromobject(%brick).client;
if(isObject(%c) && isObject(%c.player) && isObject(%c.player.tempbrick))
{
%pos1x = getWord(%c.player.tempbrick.getWorldBox(), 0);
%pos1y = getWord(%c.player.tempbrick.getWorldBox(), 1);
%pos2x = getWord(%c.player.tempbrick.getWorldBox(), 3);
%pos2y = getWord(%c.player.tempbrick.getWorldBox(), 4);
if(%pos1x > 124 || %pos1x < -124 || %pos1y > 124 || %pos1y < -124 || %pos2x > 124 || %pos2x < -124 || %pos2y > 124 || %pos2y < -124)
{
commandtoclient(%c,'centerprint',"\c6Too far - Build closer to the center.",2);
%brick.schedule(0, "delete");
}
}
}
}
};
ActivatePackage(BrickRangePackage);