Page 1 of 3
Problem with the .Scr
Posted: Sat Aug 20, 2005 8:45 am
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
Try this
Posted: Sat Aug 20, 2005 3:34 pm
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
Posted: Sun Aug 21, 2005 12:13 pm
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?
objective map
Posted: Sun Aug 21, 2005 6:04 pm
by tltrude
Sorry, can you explain the problem again? Are your pk3 folders correct?
Mohaa/main/maps/obj ---> bastogneobj.scr and bastogneobj.bsp
Posted: Mon Aug 22, 2005 8:48 am
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
Posted: Mon Aug 22, 2005 10:43 am
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
Posted: Mon Aug 22, 2005 5:43 pm
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.
hmmm,
Posted: Tue Aug 23, 2005 1:38 am
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.
Posted: Tue Aug 23, 2005 4:30 am
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..
Posted: Wed Aug 24, 2005 5:41 pm
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?
Posted: Wed Aug 24, 2005 6:11 pm
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.
Posted: Wed Aug 24, 2005 6:47 pm
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.
compile
Posted: Wed Aug 24, 2005 10:47 pm
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.
Posted: Thu Aug 25, 2005 6:21 am
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
--------------
Posted: Thu Aug 25, 2005 8:02 am
by lizardkid
BSP:
-v
VIS:
-fast -v
LIGHT:
-verbose -fast -bounce 0