Page 1 of 1
CAn we spawn pathnodes from the script file?
Posted: Thu Jan 12, 2006 3:03 am
by grb
Hi all.
Goal: in script file spawn pathnodes.
Question: Is it possible?
Reason: I do not have the original map only the bsp. I de-compiled it, and know where I would want to place the pathnodes.
I have tried:
spawn "pathnode" "targetname" "px1" "angle" "180" "origin" ( 0 0 200 )
I also tried above with no parens around pathnode.
Result: in both case.........game just hangs up during loading, must reboot.
Please no guesses. If someone has solid code to spawn a pathnode I would appreciate you sharing it.
Thank you,
George
Re: CAn we spawn pathnodes from the script file?
Posted: Thu Jan 12, 2006 3:15 am
by GiffE1118
grb wrote:Hi all.
Goal: in script file spawn pathnodes.
Question: Is it possible?
Reason: I do not have the original map only the bsp. I de-compiled it, and know where I would want to place the pathnodes.
I have tried:
spawn "pathnode" "targetname" "px1" "angle" "180" "origin" ( 0 0 200 )
I also tried above with no parens around pathnode.
Result: in both case.........game just hangs up during loading, must reboot.
Please no guesses. If someone has solid code to spawn a pathnode I would appreciate you sharing it.
Thank you,
George
the classname is info_pathnode not pathnode
Posted: Thu Jan 12, 2006 3:31 am
by grb
GiffE1118,
Thanks. I am very certain I also tried:
spawn "info_pathnode" "targetname" "px1" origin ( 0 0 200 )
But I will try the above version once again. Also will try below.
spawn script_object "targetname" "px1" "classname" "info_pathnode" "origin" ( 640 640 200 ) "angle" "180"
Posted: Thu Jan 12, 2006 4:08 am
by grb
What I suggested on trying.... the line with embedded "script_object",
obviously was wrong to begin with. However I did try the following with the same results, being.......system just hangs up upon loading script file.
spawn "info_pathnode" "targetname" "px1" "origin" ( 640 640 200 ) "angle" "180"
I also tried above, including the following in the line:
"classname" "info_pathnode"
And I also tried a version where I put the directory in the line like this:
"info/pathnode" Where this is what we see in radiant when we crate a map, and add right click on map and select a pathnode.
So looks like I still need some help here.
Thanks.
Posted: Thu Jan 12, 2006 4:42 am
by bdbodger
Well working with decompiled maps is very bad anyway most decompilers create so many extra brushes it takes you forever to fix the map or it does not do the patches right , decompiled maps are a waste of time . If you want pathnodes in a map you may want to try the bodger_nodes.scr I wrote just for that . You can get it at my site by clicking on my sig or going to bodger-mods.com . How it works is you start the script in your level script
exec global/bodger_nodes.scr
Then when you are ready use your fire button to turn it on , after it is started where ever you go in your map it will spawn coronas , run through your map untill the area you want pathnodes in is covered . Then type writescript 1 , into the console . That will write a script to qconsole.log ( turn on logging for that to work if it is not on ).
<----------- Botpath node writeout--------------->
.......
.......
copy what is below that line to the top of your level script before level waittill prespawn . Run your map again this time you do not have to exec global/bodger_nodes.scr . After you quit running your map the second time look in the directory the map was in you should find a .pth file . If you do then everything went ok and you can take all the lines you added to the level script out all you need is the .pth file ( this will work serverside ) thats it if you have the .pth file you can spawn bots or whatever and it will work .

Posted: Thu Jan 12, 2006 5:03 am
by grb
bd,
Damn I am sorry. I should have been a little more implicit in my original post.
I am not working with the "decompiled map". I decompiled the bsp that came with the zip file in order to just see what the person put into their map.
So while in radiant, with the decompiled version (WHICH I DO NOT RECOMPILE AND ATTEMPT TO USE), I simply see where I wanted to add pathnodes and other objects using the spawn feature in the original script file that came with the package.
So. That is why I was asking if one can spawn a pathnode into the bsp as the game is loading.
It seems like your posts assumes one has a usuable map. I don't only the bsp and the bastardized de-compiled map which is good enough for viewing main terrain etc..
........
Have you ever successfully spawned pathnodes into a bsp during the script loading stage?
Thanks,
George
Posted: Thu Jan 12, 2006 6:46 am
by grb
bd,
I decided to download your suggested package. I followed the directions.
I did not use the map in question but a little test bed map. But bottom line is
it I copied and pasted the results found in the console file for the generated nodes after doing the writescript 1. Then quit the game. Low and behold I see a pth file being gererated.
So it appears all I have to do in the downloaded map which contains a script file is use your format that got created in the console file and using a editor add the coordinates appropriately for each pathnode I want to get generated in this downloaded game. Run it, allow it to create a pth file for that bsp.
I appreciate your program simply creates the bot spawn lines that then get added to the script file above the level waittill prespawn level.
So I can always just make a templete txt file that I can paste into a script file and change the appropriate [x] array part and the xyz coordinates.
Thanks a whole lot for your help!
George
Posted: Thu Jan 12, 2006 7:28 am
by bdbodger
You are correct on all points the only thing is if you are going to add lots of pathnodes then my script is the easiest way you don't have to find coords . At my site you may have notice the botmaps done by proximo all the nodes for the bots where created through scripting from other maps done by other ppl he just made them into bot maps with the botsmapper that I also made and which also has a pathnode makeing feature .
Posted: Thu Jan 12, 2006 5:20 pm
by grb
bd,
understand your wisdom for using the tool to create lots of pathnodes the easy way, verse having to figure out coordinates by looking in a map.
Today I will use your tool for the map in question. It is a huge map, hope
it will work out ok.
regards,
George.
Posted: Fri Jan 13, 2006 1:10 am
by grb
bd,
Goal complete. And it appears keeping the spawn line arguments in the script file, after the first run do not have any ill effect on playing the game later on. So I think I will keep them in the file for reference sake, since I only added some twenty nodes.
Thanks again for your help.
regards,
George
Posted: Fri Jan 13, 2006 10:18 am
by bdbodger
Actually what I did with a mod is I had a bud with JVbots so I invited him to play southern france and suprised him by spawning bots ( without the bot scripts just the bots ) I used the pathnode lines by picking one at random to spawn a bot at
spawn bla bla bla origin level.botnode[randomint( level.botnode.size)].origin
Also game might crash if you add pathnodes without deleteing the .pth file first so yes save the info either in another file of just leave them in the level script they won't hurt just are not needed . The sample with the botsmapper has 530 spawned pathnodes I wouldn't want to have to do that all over again .
Posted: Sat Jan 14, 2006 3:00 am
by grb
bd,
I am sure you surprised your gaming buddy with the bots jumping out of nowhere, when he did not expect them.
YES. when I originally tried to run the game after installing by hand spawn points in script file, the game would hang up. It had the original path file that came with the package.
So I did delete it and from therein, since I have not changed the script file pathnodes spawns or added additional ones, it runs just when I start the game. I realize if I want to modify the pathnode further I will have to delete the path file.
Thanks for bring that point up.
best regards,
George