Getting brush dimensions?

Discussions about Coding and Scripting
Post Reply
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Getting brush dimensions?

Post by UT Sniper (SJA94) »

Might be a stupid question bought on by not sleeping and missing something but, is there a way in uscript where you can get a brush's dimensions(or alternatively map zone dimensions)? What I'm attempting to do is make a 2D interactive map for NodeStats, if I can't do it in uscript I'll have to look into getting it from the map file itself instead, but being retarded will make it difficult :P .

I've got spawns, pickups, flags, dom points, kill -> deaths, and co, but a top down view of a map included would make it look a lot better once completed:

Image
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Getting brush dimensions?

Post by Barbie »

Consider that some mappers have deleted the brushes.
And no, I don't know how to access the brushes with UScript. Maybe an option is to export the map to T3D and access the brushes with an external program. I remember I've seen a Perl script for such.

(In my understanding the brushes are only needed to build a BSP tree: "Rebuild Geometry" or "Rebuild All" in UnrealEd. Correct me if I'm wrong.)
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Getting brush dimensions?

Post by sektor2111 »

By spoofing ? Master-Stats perhaps have to read some file. This package-file has hard-coded dimensions measured in Editor Or other application generating technical data which UScript cannot get, and it will be loaded if available according to map-name used at time - similar to what NavAdder does. Template for generating "dimensions" and maybe other stuff from Editor directly, can go right there... At least this would be my solution. These packages might even have an INI for disabling certain things at will.

A cons for my method - it takes time to get and create those packages, but it's not impossible...

Now you only have to think at measuring map, which way, maps are complex... How accurate are intended to be results: Height, width, Length, Player Access Volume ? Worth such work ?

Method 2: Some traces organized from whatever player "eye" - having errors as well... Tracing x -x y -y z -z - trying to predict a length enough for hitting a wall and computing distances - see XC_SpectatorR10 if I well recall name for a basic sample. Funky results are going in maps with a bunch of ramps, hills, tunnels, mazes, ect.

Method 3: Placing some keypoint "markers" using as references players and computing bigger distances between these - inaccurate and slow. Dimensions are computed in time depending on player's movement. If player is sitting around you won't gain relevant data at all.

Method 4: Another solution would be measuring distances between PlayerStart actors and taking the biggest value in account - this is another inaccurate method.

Misc: Combining these Playerstarts measures + Traces + Markers dropped - Good luck, here.
User avatar
UT Sniper (SJA94)
Inhuman
Posts: 753
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: Retard
Location: England
Contact:

Re: Getting brush dimensions?

Post by UT Sniper (SJA94) »

What I think I'm going to do is just draw a basic polygon around events with +10% area, what this mini project is for is pretty much to show the action packed areas on maps during matches, think I will update the mutator some more to keep count of the amount of players spawn from which spawn point.

Red dots are the killers location, and the pink the victims locations.
Attachments
Untitled.pngdfgdfgdf.png
Post Reply