scripting: Showing spawnpoints or triggers

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

scripting: Showing spawnpoints or triggers

Post by bdbodger »

I had a map made by someone else and wanted to see the spawnpoints so what I did was make myself this small script . I call it my showbox.scr . What it does is you put this in your script

exec global/showbox.scr::show origin width length height color

like this

exec global/showbox.scr::show ( 100 444 999) 32 32 96 ( 0 0 1)

Those numbers are made up but what I did was open the bsp in notepad and found all the spawnpoints then used them with my script . This would be good when you are spawning something and useing setsize so that you can see in game if it where you wanted it .

Image

you can get it here showbox.zip
Last edited by bdbodger on Mon Nov 30, 2009 4:41 am, edited 1 time in total.
Image
User avatar
Mj
Map Reviewer
Posts: 1394
Joined: Sun Apr 25, 2004 3:36 pm
Location: England

Post by Mj »

Lol, looks pretty cool too 8-)
ImageImage
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Well I updated this script because someone asked if it could use coords like you use when useing setsize . Also I made it so that you have to be within 600 units of the box for it to draw . Each box is 12 beams so if you had lots of spawned things in your map you might get a no free edicts error this way when you get more than 600 units from it the beams are deleted preventing that error . Any way here is how to use it

// syntax:
// exec global/showbox.scr::show origin width length height color

// or if useing like setsize

// exec global/showbox.scr::setsize origin ( coords1 )( coords 2 ) color

color is the usuall ( r b g ) if you don't set a color it defaults to ( 1 1 1 ) in the setsize method you need to set the coords and origin in the show method you need to at least set the origin the defaults for width length and hieght are 50x50x50
Last edited by bdbodger on Sat Jan 08, 2005 3:57 am, edited 1 time in total.
Image
User avatar
Kalti
Major
Posts: 325
Joined: Sun Mar 16, 2003 11:46 am
Contact:

Post by Kalti »

Neat stuff bdbodger :D

Got me wondering, could something like this be created for placing spawns ? ie. walking through a map and placing spawnspots at specific locations, where they are made visible (like your current showbox) and the coordinates written to script ?

Or is that already something which can be done by use of your bot scripting tool ?
Image
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

yea,that would be cool to type a command or sumtin in console to show the size after u punch in the coords 8-)
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Yes the botsmapper does that already just set it up and use the spawning menu and writescript button when you are done and then only copy that part of the logfile writeout to your level script .

To setup put

exec global/botsmapper.scr

in your level script then open the console in game and type in logfile 2 and pushmenu botspawnmenu or the best way is to bind it to a key by typeing bind b pushmenu botspawnmenu into the console ( you do not need to use b you can bind it to any key you like ) . Then just spawn anything on the spawning menu or the nodes menu and use the writescipt button to write the script to the log file . You don't have to paste all the bots stuff just what you need . I am working on an update for the botsmapper to fix some minor things that wheren't written to the log by the save script button and other small changes but it works ok as is . The allies and axis spawnpoint should be on the nodes menu just below the allies and axis bot spawnpoints at the top of the nodes part of the menu . Just one more word there are models on the models list that where choosen because they do not cause vertex error like the static models do also ther is the mg gun on the menu too so you can use it for setting them up too .
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

bbox

Post by tltrude »

I haven't looked at your script, but couldn't you use a cvar to show bounding boxes?

r_showstaticbboxes "1"
r_showhbox "1"
Tom Trude,

Image
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

i had trouble with the botsmapper.everything i spawned i couldnt see cause the menu was in the way,i had to keep on an angle so that i could see how far down or up i needed to put the item.
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

The command to show bounding boxes shows too many boxes I just wanted to show a few for the things I wanted to show I don't even know if a spawned trigger for example will show anyway .

To get a better view with the botmapper you can click outside the menu and adjust your view then quickly open and close the console to get your mouse back .
Image
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

thnx for the tip :wink:
Image
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

can the showbox be angled?
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

No it follows the rules of setsize or length width height . You can try to make a box and then bind all the beams to one of the func_beams then rotate that beam . You would have to redo the scirpt to give the func_beams targetnames .
Image
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

ive been doing alot of work with scripting clip brushes. Not easy since you cant see what your doing. your showbox helps alot but often im working with wierd angles.

any suggestions ?
Post Reply