about scripts
Moderator: Moderators
about scripts
how do i make a script
- Axion
- Major General
- Posts: 683
- Joined: Mon Sep 29, 2003 5:14 am
- Location: Northern California
- Contact:
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9

- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9

obj
An objective map, or a singleplayer map will not work with out a script. But you don't need one if you put your bsp file in main/maps/dm.
It is nice to have one for background sound. A precache script helps to make your map run faster when it is loaded for the first round. It pre loads all the models, so players don't get those little pauses when they look around.
If you want to try a simple script, copy and paste this to Notepad. Then name it "youmapname.scr" and place it in the dm folder with your bsp file. Both files must have the same name.
It is nice to have one for background sound. A precache script helps to make your map run faster when it is loaded for the first round. It pre loads all the models, so players don't get those little pauses when they look around.
If you want to try a simple script, copy and paste this to Notepad. Then name it "youmapname.scr" and place it in the dm folder with your bsp file. Both files must have the same name.
Code: Select all
// TEST MAP
// ARCHITECTURE: Marines
// SCRIPTING: Marines
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "My Test Map"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" ""
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
exec global/ambient.scr mohdm7 // background sound
level waittill spawn
end

