Lost + found

Post your scripting questions / solutions here

Moderator: Moderators

Locked
chinaskis
Private
Posts: 4
Joined: Sun Feb 13, 2011 3:59 pm

Add Weapon(stand) for sniper server

Post by chinaskis »

Hi there, Does anyone know how can i add a weapon stand , like those in the Sniper Only Servers. I've added this:

Code: Select all

	//axis guns table 2
	local.alienx = spawn script_model
	local.alienx model "static/bunkertable.tik"
	local.alienx.origin = ( -1646 -1205 8.125)
	local.alienx.scale = 1.40
	local.alienx.angles = 360
	
	
	local.alienx = spawn script_model
	local.alienx model "weapons/KAR98sniper.tik"
	local.alienx.origin = ( -1646 -1213 84.125)
	local.alienx.scale = 1.40
	local.alienx.angles = 180
	
		
	local.alienx = spawn script_model
	local.alienx model "weapons/KAR98sniper.tik"
	local.alienx.origin = ( -1646 -1223 84.125)
	local.alienx.scale = 1.40
	local.alienx.angles = 180
	
		
	local.alienx = spawn script_model
	local.alienx model "weapons/G43.tik"
	local.alienx.origin = ( -1646 -1233 84.125)
	local.alienx.scale = 1.40
	local.alienx.angles = 180
	
		
	local.alienx = spawn script_model
	local.alienx model "weapons/G43.tik"
	local.alienx.origin = ( -1646 -1243 84.125)
	local.alienx.scale = 1.40
	local.alienx.angles = 180

Graphics seems ok, but there is no functionality in this.
I thought loadin the tics would me enough but apparently no. do i need another code to do this.

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

Post by Cpt. Duke »

Greetings, chinaskis!

You can try this for the KAR98 Sniper...



local.alienx = spawn weapons/KAR98sniper.tik
local.alienx.origin = ( -1646 -1213 84.125)
local.alienx.scale = 1.40
local.alienx.angles = 180


Hope it works!
chinaskis
Private
Posts: 4
Joined: Sun Feb 13, 2011 3:59 pm

Post by chinaskis »

Yep it worked great.

Thx for this and the quick response Cpt.Duke.
chinaskis
Private
Posts: 4
Joined: Sun Feb 13, 2011 3:59 pm

No-cross Scipt

Post by chinaskis »

Hi everyone, Im using this in order to split my map in two sides(sniper mode)

Code: Select all

//no cross 
   
 
  
badspot: 
local.spot1 = spawn trigger_multiple 
local.spot1.origin = ( 900 100 8.125 ) //your coords here 
local.spot1 setsize ( -1160 -100 -10 ) ( 1160 -90 700 ) //setsize here 
local.spot1 waittill trigger 
local.spot1 setthread badboy 
local.spot1 message "No Crossing Soldier!" 
local.spot1 delay 0 
end 

badboy: 
local.badboy = parm.other 
local.badboy say "What a shame!" 
wait 1 
local.badboy kill 
end 
but doesnt work. I've put it that after

Code: Select all

 level waittill prespawn
any ideas?

thank you!!![/code]
chinaskis
Private
Posts: 4
Joined: Sun Feb 13, 2011 3:59 pm

SOLVED

Post by chinaskis »

THIS IS ONE DID THE TRICK:
(i just post this for anyone who wants something like it)

paste after Waittill Prespawn

Code: Select all

  
local.trig = spawn trigger_multiple 
local.trig.origin = ( -100.579 10 8.125 ) 
local.trig setsize ( -100.579 -1500 1.125 ) ( -103.579 1500 1000 )
local.trig setthread  Trigger1 
local.trig message "NO CROSS!" 
local.trig wait 1 
local.trig delay 0 

  

Trigger1: 
local.player=parm.other 
if (local.player.isTrigger1==1) 
end 



local.player.isTrigger1=1 
local.player kill
local.player say "What a shame!"  
local.player.isTrigger1=0 
end
[D.o.G]FaDe2BlAcK
Sergeant
Posts: 55
Joined: Fri Dec 17, 2004 9:48 pm
Location: St. Cloud, MN
Contact:

Ugh. Loading Screen.

Post by [D.o.G]FaDe2BlAcK »

So I have never done a loading screen before, and for some reason I can't seem to get it to work. All of the tutorials are broken links and I have done everything according to the stickied thread on loading screens. All I want is a regualr loading screen with my picture in it. The name of the picture is FlakFestloading.tga/.jpg (I have both). My .pk3 is set up correctly as far as directories go. I've learned I need an ".urc" file and a .shader file. Here are mine:

.urc file

menu "dm/FlakFest" 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 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 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 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 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 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 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 "FlakFest"
}
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 "Flak Fest"
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

}
end.





And my .shader


FlakFest
{
nomipmaps
nopicmip
cull none
force32bit
surfaceparm nolightmap
{
map $whiteimage
}
{
clampMap textures/mohmenu/dmloading/FlakFestloading.jpg
blendfunc gl_one_minus_src_alpha gl_src_alpha
}
}



Is there any problems here? (I can sub this .shader for the FlakFestloading.tga shader as well)
User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

Post by Cpt. Duke »

Hello, FaDe2BlAcK!

I recently created a working loading screen for my map.

Here's how I did it?

First, I created my .jpg image called "BEL_LoadingScreen" and placed it in the following directory:

main\textures\mohmenu

Then, I wrote a simple .urc script and placed it in the main\ui directory

Here's what I wrote?

menu "test_BehindEnemyLines" 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 0 0 640 480
fgcolor 1.00 1.00 1.00 1.00
bgcolor 1.00 1.00 1.00 0.00
borderstyle "NONE"
shader "textures/mohmenu/BEL_LoadingScreen.jpg"
}

Note that the yellow text is exactly the same as the name of my map, and the green text displays the full directory where my image was placed.
[D.o.G]FaDe2BlAcK
Sergeant
Posts: 55
Joined: Fri Dec 17, 2004 9:48 pm
Location: St. Cloud, MN
Contact:

Post by [D.o.G]FaDe2BlAcK »

Hm, this did not work for me. This is what I have:

FF_loadingscreen.jpg in textures/mohmenu/dmloading

Here is my .urc file:

menu "FlakFest" 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 0 0 640 480
fgcolor 1.00 1.00 1.00 1.00
bgcolor 1.00 1.00 1.00 0.00
borderstyle "NONE"
shader "textures/mohmenu/dmloading/FF_loadingscreen.jpg"
}


The name of the bsp is FlakFest.bsp
Also, do I need to take the .shader out?
User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

Post by Cpt. Duke »

:? Hmmm :?

From what I can see, everything seems correct. I can't find any difference between my .urc and yours.

What title did you give the .urc file?

___

For my map, I didn't create any .shader files. All I needed was the .jpg and the .urc
[D.o.G]FaDe2BlAcK
Sergeant
Posts: 55
Joined: Fri Dec 17, 2004 9:48 pm
Location: St. Cloud, MN
Contact:

Post by [D.o.G]FaDe2BlAcK »

I kinda copied your title format, so it looks like FF_loadingscreen.urc

Is there anything in any of the main script that would affect this? I used the layout of another map's script, but changed it over to dm.

Also, my .bsp is in map/dm does this need to be in the .urc?
User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

Maybe This Will Work...

Post by Cpt. Duke »

You might be right. Since your map is located in the maps/dm folder, you can try this?

menu "dm/FlakFest" 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 0 0 640 480
fgcolor 1.00 1.00 1.00 1.00
bgcolor 1.00 1.00 1.00 0.00
borderstyle "NONE"
shader "textures/mohmenu/dmloading/FF_loadingscreen.jpg"
}


Also, I don't see anything wrong with the filename you used.


Hope this works! :D
[D.o.G]FaDe2BlAcK
Sergeant
Posts: 55
Joined: Fri Dec 17, 2004 9:48 pm
Location: St. Cloud, MN
Contact:

Post by [D.o.G]FaDe2BlAcK »

Yay it worked! With one exception of course... the screen shows up black. I'm gonna go research this now, I know I've seen others with this problem.

EDIT: Searching the problem produced no answers. Is there any thing else that can be done? Or should I just forget about the idea?
User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

I think I got it! :D

Post by Cpt. Duke »

Yes! I think I know what the problem is!

Focus on the following lines in your .urc:

menu "dm/FlakFest" 640 481 NONE 0

rect 0 0 640 480

Noticed the numbers in the yellow text?

I found out that if these aren?t set correctly, your loading screen will display only black. Just fool around with these numbers and see what happens. The correct settings depends on the size of your image. It may take some time to get it right, but don't give up.

If your loading screen is a single image, make sure each set of numbers in both lines are the same.

Hopefully this will get your loading screen up and running correctly!
[D.o.G]FaDe2BlAcK
Sergeant
Posts: 55
Joined: Fri Dec 17, 2004 9:48 pm
Location: St. Cloud, MN
Contact:

Post by [D.o.G]FaDe2BlAcK »

Ok cool I'll try it! Just out of curiosity, what size was your file?
User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

Post by Cpt. Duke »

The size of my loading screen image was 1024 pixels by 768 pixels.
Locked