Example:

Obviously this wouldn't be straightforward for complex brushes (polygons, terrain) but for square brushes it should be possible?
He's a great dude and I'm sure would consider making this for UT if it doesn't work there already.Yrex Tools
The Y_Tools package contains:
<CLIP>
Class Y_Ruler which allows to measure length between two walls from inside or outside. The length is approximate, so e.g. 1023 should be treated as 1024.
The trick is that the user has to copy the brush to the clipboard, and then the UScript can access the brush in T3D format from the clipboard via function PlayerPawn.PasteFromClipboard().nogardilaref wrote:there's no access to a brush individual vertices through UScript
And I thought I was the first one who was executing scripts using BrushBuilders, well that's good there must be some knowledge about it already then.JackGriffin wrote:yrex, he made this for U227: http://www.oldunreal.com/cgi-bin/yabb2/ ... 262425/0#0
Woah, that's actually a really clever way of doing it.Barbie wrote:The trick is that the user has to copy the brush to the clipboard, and then the UScript can access the brush in T3D format from the clipboard via function PlayerPawn.PasteFromClipboard().nogardilaref wrote:there's no access to a brush individual vertices through UScript
No, the point is to GET the dimensions from an existing brush without ! doing any of that.Hellkeeper wrote:There's always the option of counting grid squares and multiplying by grid size.
Or just make a brush and teak its dimensions until it fits.
If you have UEd 3.0 at hand, copy/past the brush inside it and use the integrated ruler with CTRL+Middle mouse button.
This sounds pretty much exactly like what I'm looking for, thank you. I'll contact him.JackGriffin wrote:You should talk to yrex, he made this for U227: http://www.oldunreal.com/cgi-bin/yabb2/ ... 262425/0#0
He's a great dude and I'm sure would consider making this for UT if it doesn't work there already.
Do you know if there's any existing code which does this kinda thing I can take a look at? I've never gone anywhere near editor-related stuff in UScript before.Barbie wrote:The trick is that the user has to copy the brush to the clipboard, and then the UScript can access the brush in T3D format from the clipboard via function PlayerPawn.PasteFromClipboard().nogardilaref wrote:there's no access to a brush individual vertices through UScript
It's in the web page Jack posted above: look for file "y_dimensionget.7z" on that page.Dizzy wrote:Do you know if there's any existing code which does this kinda thing I can take a look at?
Code: Select all
var() bool bLogNewNav, bLogTweakPoint, bGenerateDecoUC, bLogActors, bComputeDistance;
...
event bool Build()
{
...
if (bComputeDistance)
ComputeTheseTwo();
...
}
...
final function ComputeTheseTwo()
{
local Actor A, A1, A2;
foreach MyMap.AllActors(class'Actor',A)
{
if ( A.bSelected && A1 == None )
{
A1 = A;
continue;
}
if ( A.bSelected && A2 == None )
{
A2 = A;
break;
}
}
if ( A1 != None && A2 != None )
{
log ("Distance between"@A1.Name@and@A2.Name@=@VSize(A1.Location-A2.Location)@UU.);
A1 = None; A2 = None;
}
else
log("You must have 2 selected actors...");
}