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
Help with weapon block?
Moderator: Moderators
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
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.
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.
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



