Raised This Month: $51 Target: $400
 12% 

Getting random place on map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
supertimor
AlliedModders Donor
Join Date: Sep 2017
Old 08-25-2019 , 09:58   Getting random place on map
Reply With Quote #1

Hi, i know there's stock to find out a random place on map, does anyone know how it looks like?
Propably its using while(), searching maxs and mins, i don't really know.
If someone can place it here, i'll be grateful.
Thanks!

{CSGO}
supertimor is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 08-26-2019 , 10:22   Re: Getting random place on map
Reply With Quote #2

If you need random place to spawn there is cvar mp_randomspawn
but still it have bugs like spawn on roof.

If you need place even in wall, you can get coord by yourself or use metod from plugin
https://forums.alliedmods.net/showpo...4&postcount=85

Last edited by Indarello; 08-26-2019 at 10:27.
Indarello is offline
Halt
Senior Member
Join Date: Jan 2015
Location: Black Mesa
Old 08-26-2019 , 13:21   Re: Getting random place on map
Reply With Quote #3

Use mp_randomspawn then check for brush entities too close to the coordinates and adjust each vector as needed. Can be completely automated.
Halt is offline
Brum Brum
Junior Member
Join Date: Mar 2017
Old 08-26-2019 , 17:35   Re: Getting random place on map
Reply With Quote #4

He means a random place on the map from which, for example, a props or weapon crate can be respawn. Not a random player spawn
Brum Brum is offline
lugui
Senior Member
Join Date: Feb 2016
Location: GetClientAbsOrigin();
Old 08-27-2019 , 08:24   Re: Getting random place on map
Reply With Quote #5

it sounds like a XY problem
what exactly you want to do?
__________________
Add me for commissions!
Steam: [U:1:88621772]
Discord: lugui#0889
My Plugins
lugui is offline
supertimor
AlliedModders Donor
Join Date: Sep 2017
Old 08-28-2019 , 06:32   Re: Getting random place on map
Reply With Quote #6

I want to use stock to get random, unstucked position on map without pushing any coordinates before.
Something like checking map x,y and randomizing position - check if stuck, if yes do it again.
supertimor is offline
Halt
Senior Member
Join Date: Jan 2015
Location: Black Mesa
Old 08-28-2019 , 10:20   Re: Getting random place on map
Reply With Quote #7

Quote:
Originally Posted by Brum Brum View Post
He means a random place on the map from which, for example, a props or weapon crate can be respawn. Not a random player spawn
Who said use it for players? You get the random vector with this command....

Quote:
Originally Posted by supertimor View Post
I want to use stock to get random, unstucked position on map without pushing any coordinates before.
Something like checking map x,y and randomizing position - check if stuck, if yes do it again.
Do you have any scripting experience? This is not a hard. Get a random location, check for brush entities too close, if they are too close then check again. This is almost the definition of what a loop accomplishes.

Check for your location, if its valid then continue, if not run loop again until you get your desired output.

Last edited by Halt; 08-28-2019 at 10:23.
Halt is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode