no working loading screen

Post your scripting questions / solutions here

Moderator: Moderators

dr shenker
Sergeant
Posts: 65
Joined: Mon Jan 26, 2004 7:23 pm
Contact:

Post by dr shenker »

my loading screen works now!!!!

thanks guys

i only have one question left(I just can't stop asking new things :) )

how do i get the loading screen picturs in the score board??
-^IW^-dr shenker
The Real DM==>released@
http://www.project-engsbergs.tk
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

get a thumbnail of your map or whatever you want of it. i don't know the dimensions right offhand, but this line in code does it.

Code: Select all

level.scoreboardpic = mypic.jpg
where mypic is the pic name. :wink:

just have to add this, you can change any stock pic in-game, say you dont like seeing V2 pic at V2, well lets change it to the Hunt!

Code: Select all

scoreboardpic obj/obj1
:wink:
dr shenker
Sergeant
Posts: 65
Joined: Mon Jan 26, 2004 7:23 pm
Contact:

Post by dr shenker »

where should i put the pic??
-^IW^-dr shenker
The Real DM==>released@
http://www.project-engsbergs.tk
User avatar
hogleg
General
Posts: 1577
Joined: Tue Sep 09, 2003 5:23 pm
Location: Down South Hillbilly Country

Post by hogleg »

The Innkeeper:
Now I suggest you make a second image for the scoreboard because it is displayed square. Reduce your original screen shot to 512 high preserving the aspect ratio. Then crop the image to 512 wide. You will lose part of the image but it won?t look distorted in the scoreboard. Save it with another name, like ?yourmapname2.jpg?, along with your other screen shot. Add a shader for it in the same file as your loading screen shader. Then in your map?s script file reference the second picture for the scoreboard pic.

setcvar "g_scoreboardpic" "yourmapname2"

Spearhead does a lot cleaner job with loading screens, jpegs all the way. The .urc file is processed in order, so make sure if you want the sepia look, that it comes after your screen shot shader. Personally I don?t care for it because it is too intense. It is better to get that effect by manipulating the image in Photo Shop.
_________________
Innkeeper - moderator
"all the governments in the world are corrupt and in the hands of the Illuminati"
dr shenker
Sergeant
Posts: 65
Joined: Mon Jan 26, 2004 7:23 pm
Contact:

Post by dr shenker »

do i need to make a totaly different shader file for that?
-^IW^-dr shenker
The Real DM==>released@
http://www.project-engsbergs.tk
panTera
Brigadier General
Posts: 573
Joined: Wed Jan 29, 2003 11:46 pm
Location: The Netherlands
Contact:

Post by panTera »

the scoreboard pic goes along with the loadscreen into: ../mohmenu/dmloading/

you don't need a different shader for that, just put it under the first part;

the-real-dm
{
nomipmaps
nopicmip
cull none
force32bit
surfaceparm nolightmap
{
clampMap textures/mohmenu/dmloading/testload.tga
blendfunc gl_one_minus_src_alpha gl_src_alpha
}
}

the-real-dm_score
{
nomipmaps
nopicmip
cull none
force32bit
surfaceparm nolightmap
{
clampMap textures/mohmenu/dmloading/yourscore_pic.tga
blendfunc gl_one_minus_src_alpha gl_src_alpha
}
}

---
And in your maps script -> setcvar "g_scoreboardpic" "yourscore_pic"
dr shenker
Sergeant
Posts: 65
Joined: Mon Jan 26, 2004 7:23 pm
Contact:

Post by dr shenker »

And in your maps script -> setcvar "g_scoreboardpic" "yourscore_pic"
should i put *.jpg after this??
-^IW^-dr shenker
The Real DM==>released@
http://www.project-engsbergs.tk
panTera
Brigadier General
Posts: 573
Joined: Wed Jan 29, 2003 11:46 pm
Location: The Netherlands
Contact:

Post by panTera »

just the filename Doc.

(hehe, now why would I write 'yourscore_pic' if you needed to write 'yourscore_pic.jpg'? :wink: )
User avatar
hogleg
General
Posts: 1577
Joined: Tue Sep 09, 2003 5:23 pm
Location: Down South Hillbilly Country

Post by hogleg »

And I was just quoting you Pantera
(Oh yeah, instead of cropping the image you could also just make a new document of 512x512, and then paste the bigger image so you can position it the way you want. I think it's pretty cool that you don't need a shader file for the smaller picture. Alright, now we're getting somewhere).
"all the governments in the world are corrupt and in the hands of the Illuminati"
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

force32bit

Post by tltrude »

Don't you have to get rid of the "force32bit" line as well?
Tom Trude,

Image
dr shenker
Sergeant
Posts: 65
Joined: Mon Jan 26, 2004 7:23 pm
Contact:

Post by dr shenker »

i was thinking the same '(finally something i've learned!!! )
-^IW^-dr shenker
The Real DM==>released@
http://www.project-engsbergs.tk
dr shenker
Sergeant
Posts: 65
Joined: Mon Jan 26, 2004 7:23 pm
Contact:

Post by dr shenker »

it seems that i've made amistake in one of the scripts but i can't find it

here is the "maps/dm/the-real-dm.scr"

Code: Select all

// The-Real-DM
// ARCHITECTURE: -^IW^-dr shenker
// SCRIPTING: -^IW^-dr shenker 
main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" "Kill the enemy!!" 
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "Also kill the enemy!!"
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "yourscore_pic"


level waitTill prespawn

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

level.script = maps/dm/the-real-dm.scr
level waittill spawn

end
and here is the shader (i've used *.jpg's)

Code: Select all

the-real-dm
{ 
nomipmaps 
nopicmip 
cull none 
surfaceparm nolightmap 
{ 
clampMap textures/mohmenu/dmloading/testload.jpg 
} 
} 

the-real-dm_score
{ 
nomipmaps 
nopicmip 
cull none 
surfaceparm nolightmap 
{ 
clampMap textures/mohmenu/dmloading/yourscore_pic.jpg 
} 
} 
-^IW^-dr shenker
The Real DM==>released@
http://www.project-engsbergs.tk
panTera
Brigadier General
Posts: 573
Joined: Wed Jan 29, 2003 11:46 pm
Location: The Netherlands
Contact:

Post by panTera »

Ok, the script and shader look fine. You can use jpg but especially loadscreen shaders are picky about .jpg extensions. So first, in the shader try changeing the extensions from .jpg to .tga (just in the shader, not the actual file extention).

Also, have you updated the script, shader and urc names and the references in them from The-Real-DM to the-real-dm ?

check file names and paths:

script -> maps/dm/the-real-dm.scr
shader -> scripts/the-real-dm.shader
urc -> ui/loading_the-real-dm.urc (don't forget the prefix 'loading_')
dr shenker
Sergeant
Posts: 65
Joined: Mon Jan 26, 2004 7:23 pm
Contact:

Post by dr shenker »

my normal loading screen works fine so i didn't changed the jpg extention to a tga extention but i did it for the scoreboardpic and it didn't helped\

i will give the files again

map name==>> dm_the-real-dm_1.1
scoreboard pic=> yourscore_pic(.jpg)
the (the-real-dm).scr file==>>

Code: Select all

// The Real DM
// ARCHITECTURE: -^IW^-dr shenker
// SCRIPTING: -^IW^-dr shenker 
main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" "Kill the enemy!!" 
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "Also kill the enemy!!"
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "yourscore_pic"


level waitTill prespawn

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

level.script = maps/dm/the-real-dm.scr
level waittill spawn

end
the (the-real-dm).shader file =>>

Code: Select all

the-real-dm
{ 
nomipmaps 
nopicmip 
cull none 
surfaceparm nolightmap 
{ 
clampMap textures/mohmenu/dmloading/testload.jpg 
} 
} 

the-real-dm_score
{ 
nomipmaps 
nopicmip 
cull none 
surfaceparm nolightmap 
{ 
clampMap textures/mohmenu/dmloading/yourscore_pic.tga 
} 
} 
the(the-real-dm).urc file==>>

Code: Select all

menu "dm/dm_the-real-dm_1.1" 640 481 NONE 0 
bgcolor 0 0 0 1 
borderstyle NONE
bgfill 0 0 0 1 
fullscreen 1
//vidmode 3
//fadein 0.5
virtualres 1
postinclude ui/loadingbar.txt 



resource
Label
{
name "Default"
rect 248 0 256 256
fgcolor 1.00 1.00 1.00 1.00
bgcolor 0.50 0.50 0.50 0.00
borderstyle "NONE"
shader "paper"
}
resource
Label
{
name "Default"
rect 496 0 256 256
fgcolor 1.00 1.00 1.00 1.00
bgcolor 0.50 0.50 0.50 0.00
borderstyle "NONE"
shader "paper"
}
resource
Label
{
name "Default"
rect 496 248 256 256
fgcolor 1.00 1.00 1.00 1.00
bgcolor 0.50 0.50 0.50 0.00
borderstyle "NONE"
shader "paper"
}
resource
Label
{
name "Default"
rect 248 248 256 256
fgcolor 1.00 1.00 1.00 1.00
bgcolor 0.50 0.50 0.50 0.00
borderstyle "NONE"
shader "paper"
}
resource
Label
{
name "Default"
rect 0 248 256 256
fgcolor 1.00 1.00 1.00 1.00
bgcolor 0.50 0.50 0.50 0.00
borderstyle "NONE"
shader "paper"
}
resource
Label
{
name "Default"
rect 0 0 256 256
fgcolor 1.00 1.00 1.00 1.00
bgcolor 0.50 0.50 0.50 0.00
borderstyle "NONE"
shader "paper"
}
resource
Label
{
name "Default"
rect 0 0 640 480
fgcolor 1.00 1.00 1.00 1.00
bgcolor 0.50 0.50 0.50 0.00
borderstyle "NONE"
shader "shadow"
}
resource
Label
{
name "Default"
rect 0 0 640 480
fgcolor 1.00 1.00 1.00 1.00
bgcolor 0.50 0.50 0.50 0.00
borderstyle "NONE"
shader "wrinkles"
}
resource
Label
{
name "Default"
rect 80 32 480 368
fgcolor 1.00 1.00 1.00 1.00
bgcolor 1.00 1.00 1.00 0.00
borderstyle "NONE"
shader "white"
}
resource
Label
{
name "Default"
rect 80 32 480 368
fgcolor 1.00 1.00 1.00 1.00
bgcolor 1.00 1.00 1.00 0.00
borderstyle "NONE"
shader "sepiaoverlay"
}
resource
Label
{
name "Default"
rect 96 48 448 336
fgcolor 1.00 1.00 1.00 1.00
bgcolor 1.00 1.00 1.00 0.00
borderstyle "NONE"
shader "the-real-dm"
}
resource
Label
{
name "Default"
rect 76 28 64 64
fgcolor 1.00 1.00 1.00 1.00
bgcolor 1.00 1.00 1.00 0.00
borderstyle "NONE"
shader "ul_corner"
}
resource
Label
{
name "Default"
rect 500 28 64 64
fgcolor 1.00 1.00 1.00 1.00
bgcolor 1.00 1.00 1.00 0.00
borderstyle "NONE"
shader "ur_corner"
}
resource
Label
{
name "Default"
rect 500 340 64 64
fgcolor 1.00 1.00 1.00 1.00
bgcolor 1.00 1.00 1.00 0.00
borderstyle "NONE"
shader "lr_corner"
}
resource
Label
{
name "Default"
rect 76 340 64 64
fgcolor 1.00 1.00 1.00 1.00
bgcolor 1.00 1.00 1.00 0.00
borderstyle "NONE"
shader "ll_corner"
}
resource
Label
{
title "The Real DM"
name "Default"
rect 72 408 496 32
fgcolor 1.00 1.00 1.00 1.00
bgcolor 0.00 0.00 0.00 0.00
borderstyle "RAISED"
font facfont-20
//font courier16
}
end.
hope there is a stupid mistake in this files(because otherwise the sollution must be hard to find)

helkp will be appriciated (srry for bad english)
-^IW^-dr shenker
The Real DM==>released@
http://www.project-engsbergs.tk
panTera
Brigadier General
Posts: 573
Joined: Wed Jan 29, 2003 11:46 pm
Location: The Netherlands
Contact:

Post by panTera »

in the .urc file the mapname (bsp name) must be the same as the script and shader.

menu "dm/dm_the-real-dm_1.1" --> menu "dm/the-real-dm"

hope you get it to work now;)
Post Reply