• Getting a maps X and Y size values?
    9 replies, posted
Is there a way to obtain the values of a maps X and Y sizes?
only way I can think of is a trace... Have the trace start at 0,0,10 (this may require some tweaking because not all mappers have a box for their maps. Will work well in GMS maps though) and then trace liness to 9000,0,0; -9000,0,0; 0,9000,0; 0,-9000,0; 0,0,9000; and 0,0,-9000 and then add the X, Y, and Z distanes together and you have your map size. NOTE: this assumes the traces hit noting else besides the boundaries. This method will NOT work for maps like RP_Downtown, RP_EvoCity, etc. It needs to be a square map such as one for GM_Islands. otherwise this method will NOT work.
Well it's going to be used for every map I use on my server, which will include buildings, hills, and lots of tall objects, so no, it won't work :/ But thankyou for the reply
To improve on what SeveredSkull posted, you could pick random position until you find one that is directly under the skybox. Then you could trace up and do what's SeveredSkull suggested but up in the air since most maps don't stretch up and beyond the skybox roof.
I'll try that, thankyou for your help :D
You welcome:buddy:
[QUOTE=SeveredSkull;22415550]only way I can think of is a trace... Have the trace start at 0,0,10 ([B]this may require some tweaking because not all mappers have a box for their maps. Will work well in GMS maps though[/B]) and then trace liness to 9000,0,0; -9000,0,0; 0,9000,0; 0,-9000,0; 0,0,9000; and 0,0,-9000 and then add the X, Y, and Z distanes together and you have your map size. NOTE: this assumes the traces hit noting else besides the boundaries. This method will NOT work for maps like RP_Downtown, RP_EvoCity, etc. It needs to be a square map such as one for GM_Islands. otherwise this method will NOT work.[/QUOTE] I guess I should have made the bolded note more clear. Like Ralle said, setting it close to the sky would give better results... That is what I meant by tweaking. To do this, simply set the Z value of the origin of the trace to a higher value. (In case you didnt know.)
Thankyou both of you anyways :D
Heh. no problem. I wanted to know how to do that a while back. And it was hard as hell to figure it out without help. :D
I did think of using tracers before I started this thread, but I thought there would be an easier way of doing it, like with ScrW() and ScrH() there would be something like that for meauring values of maps
Sorry, you need to Log In to post a reply to this thread.