minefield tutorial?

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

sound

Post by tltrude »

If your map's script is working, you should hear background sounds.

exec global/ambient.scr mohdm4 //<-- ambient sound

You should probably choose a different name for your map and script because the game already has a "minefield.scr" in the global folder.

maps/dm/my_minefield.bsp
maps/dm/my_minefield.scr
Tom Trude,

Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Re: sound

Post by wacko »

tltrude wrote:You should probably choose a different name for your map and script because the game already has a "minefield.scr" in the global folder.
Good idea in general to avoid confusion, but it's workin anyway :)
User avatar
Liberator
First Lieutenant
Posts: 196
Joined: Sun Jul 02, 2006 10:55 am
Location: Denmark

Post by Liberator »

wacko wrote:Errr, so?

U did put bsp and scr into maps/dm?
U did launch ur map as a deathmatch map?
Your minefield didn't work?

U did copy ma pk3 into mohaa/main?
U did launch my map minefield?
My minefield did work?

You did take a look into my map file?
You did compare the both trigger_multiples?
...
Yes your minefield worked exellent! ;) But mine didn't.
Yes I did put both files in maps/dm
Yes I launched it in deathmach.

I took your scr file and used it instead.
I changed this line:

Code: Select all

level.script = maps/dm/Smallhills_minefield.scr 
In the Trigger_multiple I use:
Classname trigger_multiple
cnt 5
targetname minefield


I'm already using a scr file, just called OBC_SmallHills.scr for the fog.


It says :

Code: Select all

// Small Hills
// ARCHITECTURE: Liberator
// SCRIPTING: Nemesis 
main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" "DIE" 
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none"


level waitTill prespawn

//*** Precache Dm Stuff
exec global/DMprecache.scr

$world farplane_color "0.309804 0.313726 0.341176"
level.fogplane = 2000
$world farplane level.fogplane

level.script = maps/dm/OBC_SmallHills.scr

level waittill spawn



end
Could that scr cause the problems? Should I put the minefield in the same script or should I let it be as it is, for it self?

I'd changed the name on the script from minefield to Smallhills_minefield. It didn't help :(

Lib[/code]
I liberate stuff...the danish way..
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

script

Post by tltrude »

You can only have one level script for your map and it has to be named the same as your .bsp map name.

"Smallhills_minefield.scr" will not load if your map is named "OBC_SmallHills.bsp". So, my recommendation is to combine the two scripts into one named "OBC_SmallHills.scr". You can easily add the fog lines to the other script, or just add the minefield_setup line to the one you posted above.
Tom Trude,

Image
User avatar
Liberator
First Lieutenant
Posts: 196
Joined: Sun Jul 02, 2006 10:55 am
Location: Denmark

Post by Liberator »

Great! which lines from the minefield script must be copied into the old OBC_SmallHills.scr and where? :)


Oh I wrote it too fast...I'll add the line you told me ;)
I liberate stuff...the danish way..
User avatar
Liberator
First Lieutenant
Posts: 196
Joined: Sun Jul 02, 2006 10:55 am
Location: Denmark

Post by Liberator »

YES im dying when stepping into the trigger! ;) ...but second time I dont. The sound of triggering a mine is just continuing where ever I go in the map without exploding....that is even if I close the game and return, it doesn't blow me up....it just making the sound, continously:?

Lib
I liberate stuff...the danish way..
User avatar
Liberator
First Lieutenant
Posts: 196
Joined: Sun Jul 02, 2006 10:55 am
Location: Denmark

Post by Liberator »

Is this the right way to do it?

Code: Select all

// Small Hills
// ARCHITECTURE: Liberator
// SCRIPTING: Nemesis 
main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" "DIE" 
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none"


     level waitTill prespawn

     //*** Precache Dm Stuff
     exec global/DMprecache.scr

     $world farplane_color "0.309804 0.313726 0.341176"
     level.fogplane = 2000
     $world farplane level.fogplane

     level.script = maps/dm/OBC_SmallHills.scr

     thread global/minefield.scr::minefield_setup // <-- runs minefield script thread

     level waittill spawn



end
I liberate stuff...the danish way..
User avatar
Liberator
First Lieutenant
Posts: 196
Joined: Sun Jul 02, 2006 10:55 am
Location: Denmark

Post by Liberator »

Ok Its working now perfectly ;)

I had to remove the keywords : cnt and wait....

thank u guys for your patience and help ;)

Lib
I liberate stuff...the danish way..
Post Reply