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

[INC] GHW Spawnlist Generator


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 08-14-2008 , 05:32   [INC] GHW Spawnlist Generator
Reply With Quote #1

  • This script simply fills in a floating point array with random origins for player spawns. The player spawns are all tested to be assured that the spawns are valid (inside of the map). This process takes a while and test results for some maps on my home PC are listed below.
  • This process is meant to be run simply once per map which means whoever uses this script should create a way to save and load the origins.
  • An example of how this script can be used is attached (it is fully functional and requires AMXX 1.8+ (Ham Sandwich)).
  • A test plugin that I used to test the methods and bad spawns is also attached.
  • This can also be used to create random power-up/item/rune/etc. spawn locations (Change min/max size in .inc file)



  • Code:
    /* GHW Spawnlist Generator - v1.0
    *
    * by GHW_Chronic
    *   06/2008 - 08/2008
    *
    * This file is provided as is (no warranties).
    *
    *
    *
    *
    *	//This fills in the array (Float:origins[MAX_ORIGINS][3])
    *	//Methods: 1=Normal 2=Extensive 3=Exhaustive
    *	//num_origins - number of origins to find (Max is MAX_ORIGINS)
    *	genspawnlist(method,num_origins)
    *
    *	//This checks to see if a player is inside the map (Some maps may give broken random spawn points)
    *	In_Map(id)
    *
    *	//This stops the current search
    *	save_locations()
    *
    *
    *	Tests (Windows - AMD 64-bit 2.6 Ghz Dual-Core Processor):
    *
    *	Map		Method		# Found		Time (sec)	# Broken
    *	de_dust2	1		27		60		0
    *	de_dust2	2		30		93		0
    *	de_dust2	3		30		97		0
    *	de_train	1		20		60		1
    *	de_train	2		30		70		0
    *	de_train	3		30		120		0
    *	de_nuke		1		30		41		0
    *	de_nuke		2		30		65		0
    *	de_nuke		3		30		122		0
    *
    *
    *
    */
    
    
    //Number of origins to find
    #define MAX_ORIGINS	30



  • Methods
    • #1 - Normal - Searches 2,500,000,000 units3 with a 60 second timeout
    • #2 - Extensive - Searches 16,000,000,000 units3 with a 120 second timeout
    • #3 - Exhaustive - Searches 24,000,000,000 units3 with a 300 second timeout
    • Normal works for most maps yet sometimes Extensive can give better results. Exhaustive seems to give the best results however it takes on average 2-3 times longer than Normal.


  • Note: Attached below are a few examples of bad spawns not detectable by my algorithm nor the In_Map(id) function.
Attached Thumbnails
Click image for larger version

Name:	GHW_SLG-cs_assault1.jpg
Views:	4332
Size:	26.6 KB
ID:	30172   Click image for larger version

Name:	GHW_SLG-cs_assault2.jpg
Views:	4317
Size:	36.6 KB
ID:	30173   Click image for larger version

Name:	GHW_SLG-de_dust2.jpg
Views:	4733
Size:	52.2 KB
ID:	30174  
Attached Files
File Type: inc GHW_spawnlist_gen.inc (6.1 KB, 2667 views)
File Type: sma Get Plugin or Get Source (GHW_Spawnlist_Test.sma - 2730 views - 1.5 KB)
File Type: sma Get Plugin or Get Source (GHW_Spawnlist_Example.sma - 2789 views - 1.7 KB)

Last edited by GHW_Chronic; 08-14-2008 at 05:49.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
{PHILMAGROIN}
Senior Member
Join Date: Aug 2007
Location: In the middle of the des
Old 08-14-2008 , 23:49   Re: [INC] GHW Spawnlist Generator
Reply With Quote #2

very cool.
__________________
[B]
{PHILMAGROIN} is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 08-16-2008 , 08:59   Re: [INC] GHW Spawnlist Generator
Reply With Quote #3

Ea, Thank
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Tidius
Senior Member
Join Date: Apr 2008
Location: Argentina, Buenos Aires
Old 09-04-2008 , 18:30   Re: [INC] GHW Spawnlist Generator
Reply With Quote #4

I don0t understand what the plugin does :$
Tidius is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 09-04-2008 , 19:07   Re: [INC] GHW Spawnlist Generator
Reply With Quote #5

Code:
This script simply fills in a floating point array with random origins for player spawns
__________________
IneedHelp is offline
StormZone
BANNED
Join Date: Nov 2008
Location: [RO]Hunedoara/Petrosani
Old 07-29-2009 , 18:41   Re: [INC] GHW Spawnlist Generator
Reply With Quote #6

do it creates spawn point automaticly at the start of each map every time or once on every time?
StormZone is offline
Send a message via Yahoo to StormZone Send a message via Skype™ to StormZone
raybi
Junior Member
Join Date: Oct 2009
Location: Việt Nam
Old 01-17-2010 , 01:27   Re: [INC] GHW Spawnlist Generator
Reply With Quote #7

a question :
I can create internal gun recipient boxen automatically on map neither. after 1 durations be to show yourself and after 1 tense duration is abasic ???
raybi is offline
Send a message via Yahoo to raybi
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 19:02.


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