Raised This Month: $32 Target: $400
 8% 

[HOWTO] Finding a Random Origin (Scanning)


Post New Thread Reply   
 
Thread Tools Display Modes
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-17-2010 , 13:15   Re: [HOWTO] Finding a Random Origin (Scanning)
Reply With Quote #21

I have some code for both which is much better than this, but I don't have access to it here. I'll post it when I get home.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 05-17-2010 , 13:19   Re: [HOWTO] Finding a Random Origin (Scanning)
Reply With Quote #22

@ Exolent: I want a random origin in the map, but it must be reachable for a player. It's for the coins thing from earlier today.

@ hawk552: Thanks, i have found a thirth problem to. i spawn 2 things, a box and a coin. But they spawn in eachother. Maybe your new code fixes that to?

Thanks anyway for replying so fast.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-17-2010 , 13:41   Re: [HOWTO] Finding a Random Origin (Scanning)
Reply With Quote #23

You can take code from here for random reachable origins throughout a map.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-17-2010 , 13:52   Re: [HOWTO] Finding a Random Origin (Scanning)
Reply With Quote #24

Quote:
Originally Posted by Exolent[jNr] View Post
You can take code from here for random reachable origins throughout a map.
That's kind of slow. I have something that runs faster but isn't as accurate.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-17-2010 , 13:56   Re: [HOWTO] Finding a Random Origin (Scanning)
Reply With Quote #25

Quote:
Originally Posted by Hawk552 View Post
That's kind of slow. I have something that runs faster but isn't as accurate.
Well, it's purpose is for a one-time use, then save the results.
It can be modified to find more than just 32 spawn points so that they can be generated for say 100 different locations then saved.
When you need one for the player, just find the closest 5 and choose a random one.
That should be enough.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 05-17-2010 , 14:10   Re: [HOWTO] Finding a Random Origin (Scanning)
Reply With Quote #26

As long as i can place 20 entity's and a player can reach them, i'm happy. I looked at GHW's code, but i find it very complicated.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-17-2010 , 14:14   Re: [HOWTO] Finding a Random Origin (Scanning)
Reply With Quote #27

If you don't mind the one-time getting and saving, then you should use his. I gather that mine is no where near as accurate, though I could be wrong.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 05-17-2010 , 14:15   Re: [HOWTO] Finding a Random Origin (Scanning)
Reply With Quote #28

Could you define accurate a bit more?
You mean some will not be reachable?
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-17-2010 , 14:17   Re: [HOWTO] Finding a Random Origin (Scanning)
Reply With Quote #29

Quote:
Originally Posted by drekes View Post
Could you define accurate a bit more?
You mean some will not be reachable?
My code just picks random spots and checks if the point itself is clear of random shit using point contents and hull tracing. It isn't necessarily reachable. The only good way to determine whether or not something is reachable is to save player origins once in a while, but that disables it for the first run unless you temporarily substitute some other algorithm while it's getting good coordinates.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 05-17-2010 , 14:22   Re: [HOWTO] Finding a Random Origin (Scanning)
Reply With Quote #30

Sorry, but my english is not that good, i don't understand this part
Quote:
but that disables it for the first run unless you temporarily substitute some other algorithm while it's getting good coordinates.
The ent should be reachable at all times. So i guess i should use exolents link?

EDIT: i looked at Exolents link again, but i don't understand the code. I'm having big problems with the spawn things. I also checked CSDM code. But that's even more complicated that GHW_Chronic's one.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.

Last edited by drekes; 05-17-2010 at 14:37.
drekes is offline
Send a message via MSN to drekes
Reply


Thread Tools
Display Modes

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 11:49.


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