Page 3 of 11

Posted: Fri Mar 18, 2011 7:05 pm
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


Posted: Fri Mar 18, 2011 8:12 pm
by punisher2202
ok i will try :)

Posted: Fri Mar 18, 2011 8:25 pm
by punisher2202
again not work , why????

:cry: :cry: :cry: :cry:

Posted: Fri Mar 18, 2011 8:40 pm
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?

Posted: Fri Mar 18, 2011 8:40 pm
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:

Posted: Fri Mar 18, 2011 8:49 pm
by punisher2202
I use your mohdm1.scr , again does not work

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

:(

Posted: Fri Mar 18, 2011 8:58 pm
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.

Posted: Fri Mar 18, 2011 9:12 pm
by punisher2202
i use spearhead , and file is the file mainta

someone else can help us?

Help With Basic SP Scripts

Posted: Sat Mar 19, 2011 1:43 am
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

Posted: Sat Mar 19, 2011 2:48 am
by Cpt. Duke

Posted: Sat Mar 19, 2011 11:07 am
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

Posted: Sat Mar 19, 2011 1:21 pm
by Cpt. Duke
Cool! 8-)

I would have never thought to do it this way.

:D Congratulations, punisher2202! :D

Posted: Sun Mar 20, 2011 1:52 am
by Dr.Pepper-US
Hey Thanks! Those are both great sites! :mrgreen:

Posted: Sun Mar 20, 2011 2:41 am
by Cpt. Duke
This forum post offers some pretty good hints and tips as well.

/forum/viewtopic.php?t=5896

Flak Sounds

Posted: Mon Mar 28, 2011 4:13 pm
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?