Why can i see the Tank Turret through walls?

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
-[D.S.M.]-Deadeye
Lance Corporal
Posts: 17
Joined: Sun Feb 22, 2004 9:14 pm
Location: Germany
Contact:

Why can i see the Tank Turret through walls?

Post by -[D.S.M.]-Deadeye »

Hey guys!

Ive just finished a new map, called Tank attack.
But as i tried to play the map with my freinds, i saw that i can see the Tank turret through the walls.

Do you know any ideas how i can correct that?
----------------------------------------------------
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

turret

Post by tltrude »

The turret some how has "awaysdraw 1" set. So, adding "alwaysdraw 0" to it might do the trick.
Tom Trude,

Image
-[D.S.M.]-Deadeye
Lance Corporal
Posts: 17
Joined: Sun Feb 22, 2004 9:14 pm
Location: Germany
Contact:

Post by -[D.S.M.]-Deadeye »

I guess that is something what i have to and in my scr. file.

But where do i have to add it?
----------------------------------------------------
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

turret

Post by tltrude »

Well, if it is a map you made, to the properties of the turret (key N). If the turret is spawned in the script, then add it there.
Tom Trude,

Image
-[D.S.M.]-Deadeye
Lance Corporal
Posts: 17
Joined: Sun Feb 22, 2004 9:14 pm
Location: Germany
Contact:

Post by -[D.S.M.]-Deadeye »

Nope, sorry thats not the way i did it. I just added those tanks inside the script + their positions. If there is no way to make the turret hide behind a wall ob this way, can you show me a page where i can get a Tut for those tanks for MOH Allied Assault?

That would be nice
----------------------------------------------------
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

script

Post by tltrude »

To add it to a scripted tank you would do something like this.

local.tank.alwaysdraw = 0

Post the script in the scripting forum.
Tom Trude,

Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

alwaysdraw shouldn't be the problem, since that doesn't make the object show up through walls (instead it makes the entity ignore vis data). More likely the shader for that turret has the nodepthtest keyword or a sort command in it.
Image
-[D.S.M.]-Deadeye
Lance Corporal
Posts: 17
Joined: Sun Feb 22, 2004 9:14 pm
Location: Germany
Contact:

Post by -[D.S.M.]-Deadeye »

Ok, this is the script i actually have:


main:

setcvar "g_obj_alliedtext1" "Tank Map from"
setcvar "g_obj_alliedtext2" "-[D.S.M.]-Deadeye"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""


if(level.roundbased)
thread roundbasedthread

level waitTill prespawn

//*** Precache Dm Stuff
exec global/DMprecache.scr
exec global/ambient.scr mohdm6
level.script = maps/dm/tank-attack.scr


level waittill spawn

exec global/playervehicle.scr ( -450.00 300.0 -7.87 ) -160 1 alwaysdraw 0
exec global/playervehicle.scr ( 200.00 300.0 -7.87 ) -160 1 alwaysdraw 0
exec global/playervehicle.scr ( -100.00 2000.0 -7.87 ) -160 1 alwaysdraw 0
exec global/playervehicle.scr ( 2000.00 2090.0 -7.87 ) -160 1 alwaysdraw 0
exec global/playervehiclesound.scr

alwaysdraw 0

level waitTill prespawn

end
//-----------------------------------------------------------------------------

roundbasedthread:

// Can specify different scoreboard messages for round based games here.

level waitTill prespawn

// 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


What o i have to add, and where do i have to add that

EDIT:

Ah Damnit, sorry for posting it in here
----------------------------------------------------
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

global/playervehicle.scr

Post by tltrude »

That script will not help. The global/playervehicle.scr is what needs to be posted. Where did you get that script?

Remove alwaysdraw 0 from the end of those lines.
Tom Trude,

Image
Cobra {sfx}
First Lieutenant
Posts: 193
Joined: Tue Mar 23, 2004 10:25 pm
Contact:

Post by Cobra {sfx} »

Looks like the drivable tanks script which i know you see the turret thru the walls, think you need to look at what JV posted ;)
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

We solved that problem download the source files at www.smallsumo.tk
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
Post Reply