Page 1 of 1
Help with weapon block?
Posted: Wed Jan 30, 2008 2:08 am
by Tazz
ok im going to make another area to where it limited weapons....i have my cover made and my triggers and all set bu there are 2 doors coming into this area that i would like to block nades from being thrown in....can i just use like a weaponclip just like a clip wall?.....the player has to be able to walk thru the door but no nades can come thru.....maybe something like this?
local.weaponclip = spawn script_object
local.weaponclip.origin = ( -2940 2750 274 )
local.weaponclip.angles = ( 0 0 0 )
local.weaponclip setsize ( -225 -450 -5 ) ( 215 450 5 )
end
thx for the help guys
Posted: Thu Jan 31, 2008 4:13 am
by neillomax
I never tried it but weapon clip.......... and in the entities window/
key/weapontype
value/grenade
sounds far fetched, but try it.................... ????????????????
Posted: Thu Jan 31, 2008 7:28 am
by ViPER
If that doesn't work you could use clip all - then script a teleport to pass the player - if done precisely the player will not even know he has been teleported.
Posted: Thu Jan 31, 2008 3:06 pm
by Rookie One.pl
Well, what you're trying to do is extremely tricky. When the game makes a trace for a projectile, it reports collision with BSP surfaces that contain the weaponclip surface or content flag (see
article on Wikipedia). The only safe and reliable way would be to use a brush with the correct flag set, and you can't do that by scripting.
I don't think what Neil posted would work, and Viper's solution would be rather dirty and difficult to implement. What I'd suggest is a trigger_multipleall (it works slightly differently than an ordinary trigger_multiple) with the correct spawnflag set (can't remember which one it is, check in radiant, make a trigger_multipleall and check the checkbox to make it react to projectiles in the entity inspector window), calling a thread that would change the grenade's velocity vector direction. However, I'm not sure if you actually can make it move in a different direction, as the game code regarding projectiles is quite messy.
Posted: Fri Feb 01, 2008 11:38 am
by Tazz
thx for the replys everyone....i think i would have to do the teleport thing because i dont want to have to redo anything in radiant as then it woulod be a custom map and have to be downloaded....the teleport sounds about the most effecient so the map can remain stock....i guess if all else fails i can make a thin clip wall u have to walk around before going into the door and make the trigger reach there that way u cant just walk around the wall and trhow one.....thx again guys
box
Posted: Sun Feb 03, 2008 8:13 am
by tltrude
Couldn't you just spawn some solid boxes in front of the doors?