Lost + found

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

Post by Cpt. Duke »

I opened your .pk3 and discovered that you used a separate .scr file for the music (soundmp3\mohdmsound1.scr). Since other players don't have this file, your mod will not work serverside.

What you need to do is have everything in one script (mohdm1.scr).

// SOUTHERN FRANCE
// ARCHITECTURE: SENN
// SCRIPTING: POWZER


main:

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

setcvar "g_scoreboardpic" "mohdm1"

// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread

level waitTill prespawn

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

level.script = maps/dm/mohdm1.scr
exec global/ambient.scr mohdm1

//exec global/ambient.scr mohdm2

//$world farplane 5000
//$world farplane_color (.333 .333 .329)


level waittill spawn
$world farclipoverride -1

wait 5

for(local.playernum = 1; local.playernum <= $player.size; local.playernum++)
{
$player[local.playernum] stufftext "tmstartloop sound\music\mus_16a_mystery.mp3"
}

wait 0.1

for(local.playernum = 1; local.playernum <= $player.size; local.playernum++)
{
$player[local.playernum] stufftext "tmvolume .5"
}

end



//-----------------------------------------------------------------------------

roundbasedthread:

// Can specify different scoreboard messages for round based games here.

level waitTill prespawn

level waittill spawn

// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw

level waittill roundstart

end

punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Post by punisher2202 »

ok i will try :)
punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Post by punisher2202 »

again not work , why????

:cry: :cry: :cry: :cry:
User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

Post by Cpt. Duke »

:?: Hmm...This is a tricky problem.

Explain exactly what you did since my last post.

Also, may I see your mohdm1.scr again?
punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Post by punisher2202 »

Cpt. Duke wrote:I opened your .pk3 and discovered that you used a separate .scr file for the music (soundmp3\mohdmsound1.scr). Since other players don't have this file, your mod will not work serverside.

What you need to do is have everything in one script (mohdm1.scr).

// SOUTHERN FRANCE
// ARCHITECTURE: SENN
// SCRIPTING: POWZER


main:

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

setcvar "g_scoreboardpic" "mohdm1"

// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread

level waitTill prespawn

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

level.script = maps/dm/mohdm1.scr
exec global/ambient.scr mohdm1

//exec global/ambient.scr mohdm2

//$world farplane 5000
//$world farplane_color (.333 .333 .329)


level waittill spawn
$world farclipoverride -1

wait 5

for(local.playernum = 1; local.playernum <= $player.size; local.playernum++)
{
$player[local.playernum] stufftext "tmstartloop sound\music\mus_16a_mystery.mp3"
}

wait 0.1

for(local.playernum = 1; local.playernum <= $player.size; local.playernum++)
{
$player[local.playernum] stufftext "tmvolume .5"
}

end



//-----------------------------------------------------------------------------

roundbasedthread:

// Can specify different scoreboard messages for round based games here.

level waitTill prespawn

level waittill spawn

// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw

level waittill roundstart

end

this is a my mohdm1 . Again not work , only works when the. PK3 has and the client :cry: :cry:
punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Post by punisher2202 »

I use your mohdm1.scr , again does not work

Too bad. and was a good opportunity for some music in the game

:(
User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

Post by Cpt. Duke »

Are you using Spearhead? Breakthrough?

If you are using Spearhead, make sure your .pk3 is placed in the MOHAA/mainta folder, not the MOHAA/main

If you are using Breakthrough, make sure your .pk3 is placed in the MOHAA/maintt folder.
punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Post by punisher2202 »

i use spearhead , and file is the file mainta

someone else can help us?
Dr.Pepper-US
Private
Posts: 7
Joined: Wed Mar 16, 2011 4:13 am
Location: America!! :D

Help With Basic SP Scripts

Post by Dr.Pepper-US »

I need help scripting a new sp map im working on if anyone has a tut or helpful tips please post them haha any help is much appreciated :D
User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

Post by Cpt. Duke »

punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Post by punisher2202 »

Thanks the Zlatko from the modtheater for the solution works perfectly. :lol: :lol: :lol:

Zaltko script:

Code: Select all

// SOUTHERN FRANCE
// ARCHITECTURE: SENN
// SCRIPTING: POWZER

main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" "Southern France"
setcvar "g_obj_alliedtext2" "mod by"
setcvar "g_obj_alliedtext3" "WARRIORs-of-BREIZH*rommel*"
setcvar "g_obj_axistext1" "visit web site"
setcvar "g_obj_axistext2" "warriors-of-breizh.com"
setcvar "g_obj_axistext3" "mail:warriors@live.fr"

setcvar "g_scoreboardpic" "mohdm1"

	// call additional stuff for playing this map round based is needed
	if(level.roundbased)
		thread roundbasedthread
		
	level waitTill prespawn

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

	level.script = maps/dm/mohdm1.scr
	exec global/ambient.scr mohdm1

	//exec global/ambient.scr mohdm2

	//$world farplane 5000
	//$world farplane_color (.333 .333 .329)


	level waittill spawn

        thread music


music:

local.STUFFSTRING = "tmstartloop sound/music/mus_04b_suspense.mp3; seta s_volume 5.999999; seta s_musicvolume 5.999999"

while(1)
{
for(local.i = 1; local.i <= $player.size; local.i++)
{
local.p = $player[local.i]
if(local.p.music_handled != 1)
{
local.p.music_handled = 1
local.p stufftext local.STUFFSTRING
}
}
waitframe
}

end 

	$world farclipoverride -1

end


//-----------------------------------------------------------------------------

roundbasedthread:

	// Can specify different scoreboard messages for round based games here.
	
	level waitTill prespawn

	level waittill spawn

	// set the parameters for this round based match
	level.dmrespawning = 0 // 1 or 0
	level.dmroundlimit = 5 // round time limit in minutes
	level.clockside = kills // set to axis, allies, kills, or draw

	level waittill roundstart

end
User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

Post by Cpt. Duke »

Cool! 8-)

I would have never thought to do it this way.

:D Congratulations, punisher2202! :D
Dr.Pepper-US
Private
Posts: 7
Joined: Wed Mar 16, 2011 4:13 am
Location: America!! :D

Post by Dr.Pepper-US »

Hey Thanks! Those are both great sites! :mrgreen:
User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

Post by Cpt. Duke »

This forum post offers some pretty good hints and tips as well.

/forum/viewtopic.php?t=5896
[D.o.G]FaDe2BlAcK
Sergeant
Posts: 55
Joined: Fri Dec 17, 2004 9:48 pm
Location: St. Cloud, MN
Contact:

Flak Sounds

Post by [D.o.G]FaDe2BlAcK »

So I have a few flaks in my map, the question is... How do I make those bad boys roar?

It has been done on maps such as King Tiger 2 so I know it can be done... but how? Does it involve ubersound work?
Locked