Problem with the .Scr

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
Cobra
Colour Sergeant
Posts: 93
Joined: Sun Jul 17, 2005 9:22 am
Location: The Netherlands
Contact:

Problem with the .Scr

Post by Cobra »

Hi guys.

I have a problem with my own .scr . The map is finnished now but when i start the map, there is no ambient sound or scoreboard available. I have checking my .scr again en again and i cant find a wrong thing. Can enybody see a fault in my map below that the scoreboard & ambient sound created (linked)?

I have follow the Nemesis tut here ( Look below )

By the way: Is it nessesery to use an ubersound.scr in your .pk3?

Code: Select all

main: 

level waittill prespawn

exec global/DMprecache.scr
level.script = maps/obj/bastogneobj.scr

exec global/ambient.scr m4l1
exec global/door_locked.scr::lock

setcvar "g_obj_alliedtext1" "Destroy the gun" 
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "blablabla"
setcvar "g_obj_axistext2" "blabla"
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "none"

level waittill spawn

level.bomb_damage = 200
level.bomb_explosion_radius = 640
level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_to_destroy = 1
level.dmrespawning = 1 // 1 or 0
level.dmroundlimit = 15 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw

level waittill roundstart

$flak88_explosive1 thread global/obj_dm.scr::bomb_thinker
$flak88_explosive1 thread axis_win_timer

thread allies_win_bomb

end

//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------

axis_win_timer:

level waittill axiswin

end

//*** --------------------------------------------
//*** "Allied Victory"
//*** --------------------------------------------

allies_win_bomb:

while(level.targets_destroyed < level.targets_to_destroy)
waitframe

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

Try this

Post by tltrude »

Try this:

Code: Select all

main: 

setcvar "g_obj_alliedtext1" "Destroy the gun" 
setcvar "g_obj_alliedtext2" "" 
setcvar "g_obj_alliedtext3" ""
 
setcvar "g_obj_axistext1" "Protect the gun" 
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "m4l0" 

level waittill prespawn 

exec global/DMprecache.scr
level.script = maps/obj/bastogneobj.scr
exec global/ambient.scr m4l0 
exec global/door_locked.scr::lock


level waittill spawn 

level.bomb_damage = 200 
level.bomb_explosion_radius = 640 
level.defusing_team = "axis" 
level.planting_team = "allies" 
level.targets_to_destroy = 1 
level.dmrespawning = 1 // 1 or 0 
level.dmroundlimit = 15 // round time limit in minutes 
level.clockside = axis // set to axis, allies, kills, or draw 

level waittill roundstart 

$flak88_explosive1 thread global/obj_dm.scr::bomb_thinker 
$flak88_explosive1 thread axis_win_timer 

thread allies_win_bomb 

end 

//*** -------------------------------------------- 
//*** "Axis Victory" 
//*** -------------------------------------------- 

axis_win_timer: 

level waittill axiswin 

end 

//*** -------------------------------------------- 
//*** "Allied Victory" 
//*** -------------------------------------------- 

allies_win_bomb: 

while(level.targets_destroyed < level.targets_to_destroy) 
waitframe 

teamwin allies 
end
Tom Trude,

Image
User avatar
Cobra
Colour Sergeant
Posts: 93
Joined: Sun Jul 17, 2005 9:22 am
Location: The Netherlands
Contact:

Post by Cobra »

Hi,

I have try that i it even't work. I have look for previews at other maps but i do the same..

There is somewhere a wrong thing, but what? :(

Is it possible to have an forgotten linkscript?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

objective map

Post by tltrude »

Sorry, can you explain the problem again? Are your pk3 folders correct?

Mohaa/main/maps/obj ---> bastogneobj.scr and bastogneobj.bsp
Tom Trude,

Image
User avatar
Cobra
Colour Sergeant
Posts: 93
Joined: Sun Jul 17, 2005 9:22 am
Location: The Netherlands
Contact:

Post by Cobra »

Ok. I explain my whole pk3 so its handy to see:

bastogneobj.pk3

maps ->obj -> bastogneobj.scr & bastogneobj.bsp

scripts-> other things, like loadingscreen etc. ( Works Fine )

sound ->amb_bastogne -> music.mp3 ( For a radio )

textures -> A couple of textures, ( Works fine )

ubersound -> My own ubersound for the radio, looks like:

Code: Select all

aliascache music sound/amb_bastogne/music.mp3 soundparms 1.2 0.1 1.0 0.0 400 1500 auto loaded maps "dm obj"
[/size]

Is this correct, the script is in the bastogneobj.scr showed below.?
( This is the only rule in my whole ubersound )

ui -> .urc file for the loadingscreen ( Works fine )

My edited bastogneobj.scr script:

( Problem: No scoreboard pics/info. No Ambient sound. )

Code: Select all

main: 

setcvar "g_obj_alliedtext1" "Destroy the gun" 
setcvar "g_obj_alliedtext2" "" 
setcvar "g_obj_alliedtext3" "" 

setcvar "g_obj_axistext1" "Protect the gun" 
setcvar "g_obj_axistext2" "" 
setcvar "g_obj_axistext3" "" 

setcvar "g_scoreboardpic" "none" 

level waittill prespawn 

exec global/DMprecache.scr 
level.script = maps/obj/bastogneobj.scr 
exec global/ambient.scr m3l2 
exec global/door_locked.scr::lock 

level waittill spawn

thread music 

level.bomb_damage = 200 
level.bomb_explosion_radius = 640 
level.defusing_team = "axis" 
level.planting_team = "allies" 
level.targets_to_destroy = 1 
level.dmrespawning = 1 // 1 or 0 
level.dmroundlimit = 15 // round time limit in minutes 
level.clockside = axis // set to axis, allies, kills, or draw 

level waittill roundstart 

iprintln_noloc "June, 1944, 07.00 am. Bastogne, Belgium. "

$flak88_explosive1 thread global/obj_dm.scr::bomb_thinker 
$flak88_explosive1 thread axis_win_timer 

thread allies_win_bomb 

end 

//*** -------------------------------------------- 
//*** "Axis Victory" 
//*** -------------------------------------------- 

axis_win_timer: 

level waittill axiswin 

end 

//*** -------------------------------------------- 
//*** "Allied Victory" 
//*** -------------------------------------------- 

allies_win_bomb: 

while(level.targets_destroyed < level.targets_to_destroy) 
waitframe 

teamwin allies 

music:
	while(1)
	{
		$soundtrigger triggerable
		$soundtrigger waittill trigger
		$music playsound music
		println "Playing the radio."
		$soundtrigger nottriggerable
		wait 150 
	}
end 
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Post by tltrude »

Still not sure if your sound problem is the radio music or the background sound. Anyway, this script may fix the radio--remove your ubersound script.

For the scorboard picture, the script says "none" and needs the name of an image file in the textures/mohmenu/objloading folder. I used an example from the game below, but you can change it to your image name. It will need a shader if it does not already have one. Here is the shader for the example I used.

Code: Select all


objdm1
{
   nomipmaps
   nopicmip
   cull none
   force32bit
   surfaceparm nolightmap
   {
	map $whiteimage
   }
   {
     clampMap textures/mohmenu/objloading/objdm1.tga
     blendfunc gl_one_minus_src_alpha gl_src_alpha
   }
}

It is probably not a good idea to use the word "music" for targetnames, threads, and sound files because it is a command word used by the game. I changed a few in the script and local master sound workaround.

Code: Select all

// Bastogne
// ARCHITECTURE: Cobra
// SCRIPTING: Corba

main: 

setcvar "g_obj_alliedtext1" "Destroy the gun" 
setcvar "g_obj_alliedtext2" "" 
setcvar "g_obj_alliedtext3" "" 

setcvar "g_obj_axistext1" "Protect the gun" 
setcvar "g_obj_axistext2" "" 
setcvar "g_obj_axistext3" "" 

setcvar "g_scoreboardpic" "objdm1"  //<--scoreboard picture shader name

local.master = spawn ScriptMaster
local.master aliascache music_radio sound/amb_bastogne/music.mp3 soundparms 1.2 0.1 1.0 0.0 400 1500 auto loaded maps "dm obj" 

level waittill prespawn 

exec global/DMprecache.scr 
level.script = maps/obj/bastogneobj.scr 
exec global/ambient.scr m3l2 
exec global/door_locked.scr::lock 

level waittill spawn 

thread play_music 

level.bomb_damage = 200 
level.bomb_explosion_radius = 640 
level.defusing_team = "axis" 
level.planting_team = "allies" 
level.targets_to_destroy = 1 
level.dmrespawning = 1 // 1 or 0 
level.dmroundlimit = 15 // round time limit in minutes 
level.clockside = axis // set to axis, allies, kills, or draw 

level waittill roundstart 

iprintln_noloc "June, 1944, 07.00 am. Bastogne, Belgium. " 

$flak88_explosive1 thread global/obj_dm.scr::bomb_thinker 
$flak88_explosive1 thread axis_win_timer 

thread allies_win_bomb 

end 

//*** -------------------------------------------- 
//*** "Axis Victory" 
//*** -------------------------------------------- 

axis_win_timer: 

level waittill axiswin 

end 

//*** -------------------------------------------- 
//*** "Allied Victory" 
//*** -------------------------------------------- 

allies_win_bomb: 

while(level.targets_destroyed < level.targets_to_destroy) 
waitframe 

teamwin allies

end 

play_music: 

      $soundtrigger waittill trigger 
      $music playsound music_radio
      println "Playing the radio." 
      wait 150
      thread play_music

end 
Tom Trude,

Image
User avatar
Cobra
Colour Sergeant
Posts: 93
Joined: Sun Jul 17, 2005 9:22 am
Location: The Netherlands
Contact:

Post by Cobra »

Thanks for helping me out tltrude, i appriciated that.

I have try thoose settings but it is not working yet, i think its a link script fault in a file i think. 1 point can be the problem, as its possible, you have msn tltrude?

So i can send you my pk3.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

hmmm,

Post by tltrude »

I can't do much because it is a Spearhead or Breakthrough map--I don't have those installed. I am trying to make an mohaa version and will let you know.

By the way, I can not find a trigger_use named "soundtrigger" in the map.
Tom Trude,

Image
User avatar
Cobra
Colour Sergeant
Posts: 93
Joined: Sun Jul 17, 2005 9:22 am
Location: The Netherlands
Contact:

Post by Cobra »

The trigger use for the radio or the ( whole ambient sound ) ?

I have put a script_model for the radio in the hous. Is it nessesery to use a trigger use for a ambient sound or..
User avatar
Cobra
Colour Sergeant
Posts: 93
Joined: Sun Jul 17, 2005 9:22 am
Location: The Netherlands
Contact:

Post by Cobra »

tltrude, thanks you very much for all thoose fixes. I found my map in a totally new admosphere because the dimlights etc. My question was how to fix the trigger for the bomb but is fixed too. Impressive work! :)

I have test him out, but the //waitill roundstart is not working. I mean, when 2 players are in the map doesnt restart yet. Everything is working! Execpt the Axis/Allied win ( Waittill round restart ).

Thanks for the ladder and windowns etc... well done!

I have added some extra lightpost in the map but when i render my map with mbuilder ( it took so VERY long, more then 5 ours ) Is this normal for rendering?
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

The Light stage is painstakingly long, for a decently sized 16 player map it may take up to a day, depending of course on how many point lights you've created, light-emitting surfaces you've made, etc.

for testing, cut down the time by putting these in your Light stage window in MBuilder.

-verbose -fast -bounce 0

It'll keep the map compiling for testing in a matter of minutes still, but don't use them for a final compile.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
Cobra
Colour Sergeant
Posts: 93
Joined: Sun Jul 17, 2005 9:22 am
Location: The Netherlands
Contact:

Post by Cobra »

Thanks,

I have add thoose rules and it works, but i have a little dark map so you can see the lights good. But the whole map is very light, so i can't see the light if he's on or off.

I dont know, maybe this is not possible to render the map in this quikly mode.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

compile

Post by tltrude »

I used:

v
fast
nothing in the light option

With that it took about 30 minutes. I did try a final light compile, but the edges of your patch hills had black spots. So I went back to no command in the light option.

I didn't test the objective stuff.
Tom Trude,

Image
User avatar
Cobra
Colour Sergeant
Posts: 93
Joined: Sun Jul 17, 2005 9:22 am
Location: The Netherlands
Contact:

Post by Cobra »

I used:

BSP: v
VIS: -fast

After that, the rendering looks different but it doesnt work for the lights. The whole map is light and you can't see how it looks with the lightpost etc..

I have try many things but i have to find the right one for quik testing included the ambient light.

VIS:
-fast
-v
--------------
VIS:
-fast
-v

BSP:
-fast
-v
--------------
BSP:
-v

VIS
-fast
--------------
Light
-v
-fast
--------------
VIS:
-v

Light:
-fast
--------------
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

BSP:
-v

VIS:
-fast -v

LIGHT:
-verbose -fast -bounce 0
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Post Reply