Blockland Forums > General Discussion

BL MMORTS

Pages: << < (8/9) > >>

mlockha:


--- Quote from: mp7964 on August 07, 2011, 11:03:42 PM ---I give it two.

--- End quote ---
Nvm.

onesis:

You know how I was saying the Events weren't working properly? Well take a look at this. Say I use this output in the direction of up. With the way this is written, it would only work if the target brick overlaps the center. In the case that the target brick is offset away from the center (which is my case all the time) the event doesn't even work.

The default events of fireRelayUp etc. use some sort of dynamic tracking system that tracks the nearest target brick no matter it's position along the original brick's edge. It also (surprise, surprise) can activate ALL the bricks along it's edge. So to everyone who thought I just sucked, go suck an egg. Anyhoo, how do I take a look at the default directional fireRelay events' code so I can edit/report this VCE event?


--- Code: ---function fxDtsBrick::VCE_relayCallFunction(%brick,%direction,%name,%args,%client)
{
%start = posFromTransform(%brick.getTransform());
%db = %brick.getDatablock();
%angle = %brick.getAngleID();
if(%angle == 1 || %angle == 3)
{
%addX = %db.brickSizeY * 0.55;
%addY = %db.brickSizeX * 0.55;
}
else
{
%addX = %db.brickSizeX * 0.55;
%addY = %db.brickSizeY * 0.55;
}
%addZ = %db.brickSizeZ * 0.22;
//Up Down North East South West
switch(%direction)
{
case 0:
%add = 0 SPC 0 SPC %addZ;
case 1:
%add = 0 SPC 0 SPC -%addZ;
case 2:
%add = 0 SPC %addY SPC 0;
case 3:
%add = %addX SPC 0 SPC 0;
case 4:
%add = 0 SPC -%addY SPC 0;
case 5:
%add = -%addX SPC 0 SPC 0;
}
%end = vectorAdd(%start,%add);
%ray = containerRaycast(%start,%end,$TypeMasks::FxBrickAlwaysObjectType,%brick);
%col = firstWord(%ray);
if(isObject(%col))
{
if(getTrustLevel(%col,%brick) < 2)
return;
%col.VCE_callFunction(%name,%args,%client);
}
}
--- End code ---


rkynick:

As a person who has made a blockland RTS before, I'm going to go ahead and say you have no chance to make survive your time.

onesis:

so did you finish yours? or did it suck? cause i don't care, this is not a waste of my time. I'm actually making significant progress now.

rkynick:

Trying to event it is a pointless and inevitably fruitless endeavor.

Pages: << < (8/9) > >>

Go to full version