I have heard we need to do what is called scripting. Now I have read most of the tutorials about how it works, but im still very confused... If anyone could help me with this it would be a HUGE help. I am just wondering what else needs to acompany a .map file once it has been compiled. Also, I am wondering how a "script" is encorporated into the .map file... Do I need to put both of these pieces into a main file? Such as the .pk3 files included in the original game? Also, what... other than the script, needs to come with the .map. Finally, is there such thing as a "pre-made" script that I can just (be lazy) and put in with my file. I dont want my map to have any special custom adds. Just the basic game with realism on. Im not even sure if all this needs to be included in the "script" and im not 100% sure I know what "scripting" does in MOH radiant, but if anyone could help straighten this out for me I would really appreicaite it, I just wana make maps! Thanks! (You can contact me on ICQ at 99403965 if you feel it will take more than a post to explain). Again, thanks so much and hope to hear from ya!
new to scripting, need some help
Moderator: Moderators
new to scripting, need some help
Hi all, thanks for your help in advance. I am just starting editing maps and such. I have compiled my first map and it actually worked, which i was very pleased with =D. But to my suprise, when I got into the map, I had no weapons, wasnt able to choose a team or anything like that. This is when I realized it was a BIT more complex 
I have heard we need to do what is called scripting. Now I have read most of the tutorials about how it works, but im still very confused... If anyone could help me with this it would be a HUGE help. I am just wondering what else needs to acompany a .map file once it has been compiled. Also, I am wondering how a "script" is encorporated into the .map file... Do I need to put both of these pieces into a main file? Such as the .pk3 files included in the original game? Also, what... other than the script, needs to come with the .map. Finally, is there such thing as a "pre-made" script that I can just (be lazy) and put in with my file. I dont want my map to have any special custom adds. Just the basic game with realism on. Im not even sure if all this needs to be included in the "script" and im not 100% sure I know what "scripting" does in MOH radiant, but if anyone could help straighten this out for me I would really appreicaite it, I just wana make maps! Thanks! (You can contact me on ICQ at 99403965 if you feel it will take more than a post to explain). Again, thanks so much and hope to hear from ya!
I have heard we need to do what is called scripting. Now I have read most of the tutorials about how it works, but im still very confused... If anyone could help me with this it would be a HUGE help. I am just wondering what else needs to acompany a .map file once it has been compiled. Also, I am wondering how a "script" is encorporated into the .map file... Do I need to put both of these pieces into a main file? Such as the .pk3 files included in the original game? Also, what... other than the script, needs to come with the .map. Finally, is there such thing as a "pre-made" script that I can just (be lazy) and put in with my file. I dont want my map to have any special custom adds. Just the basic game with realism on. Im not even sure if all this needs to be included in the "script" and im not 100% sure I know what "scripting" does in MOH radiant, but if anyone could help straighten this out for me I would really appreicaite it, I just wana make maps! Thanks! (You can contact me on ICQ at 99403965 if you feel it will take more than a post to explain). Again, thanks so much and hope to hear from ya!
well,abviously u didnt read many important tutorials,
the basic script tut in the turtorials section explains how 2 make the "basic script" of a map here is the link,and this is the basic general script needed for a map(although a map can work without it)
anything after the 2 // are tips and are not commands (thats y we put // 2 stop executing the line that follows).
this link is for pk3 making,although u dont need 2 put ur map into a pk3 2 play it(its easier 4 distribution however).a .pk3 is a compression format like .zip which mohaa can read and it represnts the main folder of mohaa.
but if u want 2 choose teams , weapons n stuff move urmap.bsp file from main\maps 2 main\maps\dm and activate it like bdboder said as a multiplayer game
.i hope this has helped u
the basic script tut in the turtorials section explains how 2 make the "basic script" of a map here is the link,and this is the basic general script needed for a map(although a map can work without it)
Code: Select all
// Yourmapname title
// ARCHITECTURE: Who made the map
// SCRIPTING: Who did the scripting
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" ""
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "none" // your score board picture
level waittill prespawn
exec global/DMprecache.scr
exec global/ambient.scr yourmapname
// may want to make your own ambient sounds, read the tut
level.script = "maps/dm/yourmapname.scr"
// remember to put in your map name
level waittill spawn
//add more codes here after you add more features to your maps
end
this link is for pk3 making,although u dont need 2 put ur map into a pk3 2 play it(its easier 4 distribution however).a .pk3 is a compression format like .zip which mohaa can read and it represnts the main folder of mohaa.
but if u want 2 choose teams , weapons n stuff move urmap.bsp file from main\maps 2 main\maps\dm and activate it like bdboder said as a multiplayer game
correction
One little correction to M&M's example script. The line below is for background sound in your map, but it wont work with your map name at the end (unless you make a .mus file). It is better to just barrow the background sound from one of the game maps. Like this:
exec global/ambient.scr mohdm7 // Just wind sounds.
Also, "//add more codes here after you add more features to your maps" should really go below the "end" command for the main thread.
exec global/ambient.scr mohdm7 // Just wind sounds.
Also, "//add more codes here after you add more features to your maps" should really go below the "end" command for the main thread.
well thanks so much for the help guys, i didnt know all ya needed was the two basic scripts, i guess i missed those tutorials. Im not as organized as I thoguht =) But your help is really appreciated. Ill try out all this info and post again if I need help, which i most likely will, this stuff is hard to start! Heh, thanks so much guys!
*addition* already got a question =/. When you say to "add it into the DM folder. Do you mean the one in the main/maps/dm folder? Thats the only DM folder I can see and the other levels are not listed in there. Im assuming the main maps in the game are part of the main .pk3 files so im not gonna worry about those not being in there, I just wana make sure im putting it in the right folder.
Aslo, second question. When you say to add the script to the map. What does that mean? Does that mean just name is "map.scr" (map would be whatever my map name is) and put it in the DM directory also? Any helped woudl be appreciated! Thanks in advance.
*addition* already got a question =/. When you say to "add it into the DM folder. Do you mean the one in the main/maps/dm folder? Thats the only DM folder I can see and the other levels are not listed in there. Im assuming the main maps in the game are part of the main .pk3 files so im not gonna worry about those not being in there, I just wana make sure im putting it in the right folder.
Aslo, second question. When you say to add the script to the map. What does that mean? Does that mean just name is "map.scr" (map would be whatever my map name is) and put it in the DM directory also? Any helped woudl be appreciated! Thanks in advance.
Yes you are right about putting your map and .scr into the dm folder . The games maps are in pak5.pk3 in the dm and obj folders but you don't need to put your maps in a .pk3 to just play them . Usually if you are sending them to someone you would make a .pk3 which is actually a .zip file . That saves space and it is easier to send one .pk3 that a .bsp .scr and mymap_precache.scr if you have one .
havent heard of a hitch warning b4 ,but im not experienced in scripting yet
.try typing logfile 1 in the console b4 making the server,this will make a log file in ur main directory called qconsole ,search thru it and c what was causing the error,or just post it here and maybe some1 with more experience can help 


