Page 1 of 1

Script

Posted: Mon Dec 26, 2005 5:48 pm
by snajperu
Hi, i have made a testmap named test_troom. I've puted it into "D:/Medal of Honor/main/maps/obj" folder. I have also made a script which is looking exactly this:

//BARTS MAP
//ARCHITECTURE: Bartosz Gaik
//SCRIPTING: Bartosz Gaik

exec global/ai.scr
exec global/loadout.scr maps/obj/test_troom.scr
main:
level waittill prespawn
exec global/ambient.scr test_troom
level waittill prespawn
$player item weapons/colt45.tik
fadein 2 0 0 0 1
wait 2
level.script = "maps/obj/test_troom.scr

I have puted it into a "D:/Medal of Honor/main/maps/obj" folder and save as test_troom.scr And what? Not work ! :x :evil: What is not ok?!
I also tried to make a .pk3 file in pakscape - succesfull, but when i load a map i have no colt45 but when i write in gameconsole maplist i have my test_troom.bsp in main like other scripted maps from other guys. Plx help

Posted: Mon Dec 26, 2005 7:47 pm
by lizardkid
try this instead

Code: Select all

//BARTS MAP 
//ARCHITECTURE: Bartosz Gaik 
//SCRIPTING: Bartosz Gaik 

exec global/ai.scr 

main:
 
level waittill spawn

$player item weapons/colt45.tik 
fadein 2 0 0 0 1 
level.script = "maps/obj/test_troom.scr

end
You had two "level waittill prespawn"s and no "end" after the code ;)
You also had a couple unneeded lines, such as "wait 2" before the level script thing.

Posted: Mon Dec 26, 2005 7:55 pm
by snajperu
Thank You so much
I will try this one now, unneeded lines etc is effect of my small experience of scripting :)

Posted: Mon Dec 26, 2005 9:59 pm
by snajperu
Still nothing.
I copied your script which u wrote for me and i save it as test_troom
later i open pakscape and put test_troom.bsp and test_troom.scr files, then i save as... as troom.pk3. I have opened the game and console. i wrote maplist comand. I opened test_troom.bsp
Mike Powell still weaponless :(
Plx help :( :?:

Posted: Mon Dec 26, 2005 11:38 pm
by lizardkid
ah, it's your folder structure, singleplayer maps should just be put in the
MOHAA>main>maps folder, as opposed to MOHAA>main>maps>obj

Posted: Tue Dec 27, 2005 10:28 am
by snajperu
works perfectly :)
U r my master from that time :)
But tell me another thing I have my test_troom.bsp and test_troom.scr and test_troom.pk3 files in folders mohaa/main/maps and mohaa/main/maps/obj In script I wroted "mohaa/main/maps/obj/test_troom.scr"
Can it be "mohaa/main/maps/test_troom.scr"?
This is not as important as first thing in which u helped me so much :)
Thank u man :D

Main

Posted: Tue Dec 27, 2005 7:09 pm
by tltrude
A pk3 file is a compressed version of the main folder and is not needed for testing. After everything is working well, you can make a pk3 for others to download. It goes in "Mohaa/main", and then the bsp and scr files in "main/maps" will not be needed. The game will use the uncompressed files by default.

If you want weapons and sound, place the bsp file in "main/maps/dm" (No script is needed for Deathmatch maps). Then troom should be on the list of Team Match maps. Your map will need a single info_player_start spawnpoint and at least one each of the info_allied and info_axis spawnpoints.