Script

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
snajperu
Colour Sergeant
Posts: 75
Joined: Sun Nov 20, 2005 5:44 pm

Script

Post 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
Sojuz nieruszymyj riespublik swobodnych,
Splotila nawieki Wielikaja Rus'
Da zdrawstwujet sozdannyj wolej norodow,
Jedinyj, moguczij Sowitskij Sojuz!

Slaw'sia Otieczestwo nasze swobodnoje,
Druzby narodow nadioznyj oplot!
Znamia sowietskoje, znamia narodnoje
Pust' ot pobiedy k pobiedie wiediot!
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
snajperu
Colour Sergeant
Posts: 75
Joined: Sun Nov 20, 2005 5:44 pm

Post by snajperu »

Thank You so much
I will try this one now, unneeded lines etc is effect of my small experience of scripting :)
Sojuz nieruszymyj riespublik swobodnych,
Splotila nawieki Wielikaja Rus'
Da zdrawstwujet sozdannyj wolej norodow,
Jedinyj, moguczij Sowitskij Sojuz!

Slaw'sia Otieczestwo nasze swobodnoje,
Druzby narodow nadioznyj oplot!
Znamia sowietskoje, znamia narodnoje
Pust' ot pobiedy k pobiedie wiediot!
snajperu
Colour Sergeant
Posts: 75
Joined: Sun Nov 20, 2005 5:44 pm

Post 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 :( :?:
Sojuz nieruszymyj riespublik swobodnych,
Splotila nawieki Wielikaja Rus'
Da zdrawstwujet sozdannyj wolej norodow,
Jedinyj, moguczij Sowitskij Sojuz!

Slaw'sia Otieczestwo nasze swobodnoje,
Druzby narodow nadioznyj oplot!
Znamia sowietskoje, znamia narodnoje
Pust' ot pobiedy k pobiedie wiediot!
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
snajperu
Colour Sergeant
Posts: 75
Joined: Sun Nov 20, 2005 5:44 pm

Post 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
Sojuz nieruszymyj riespublik swobodnych,
Splotila nawieki Wielikaja Rus'
Da zdrawstwujet sozdannyj wolej norodow,
Jedinyj, moguczij Sowitskij Sojuz!

Slaw'sia Otieczestwo nasze swobodnoje,
Druzby narodow nadioznyj oplot!
Znamia sowietskoje, znamia narodnoje
Pust' ot pobiedy k pobiedie wiediot!
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Main

Post 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.
Tom Trude,

Image
Post Reply