10-02-2007, 09:58 PM | #1 |
Join Date: Sep 2007
Posts Rated Helpful 0 Times
|
Creating a no nade zone
I cannot get this to work at all. I have included the base_Ctf in the LUA and have also tried it with base_teamplay. I made a brush and tied it to a trigger_ff_script. base_teamplay has this:
Code:
----------------------------------------------------------------------------- -- No grens: area where grens won't explode ----------------------------------------------------------------------------- nogrens = trigger_ff_script:new({}) function nogrens:onexplode( explode_entity ) if IsGrenade( explode_entity ) then return EVENT_DISALLOWED end return EVENT_ALLOWED end no_grens = nogrens ----------------------------------------------------------------------------- -- No Fucking Annoyances ----------------------------------------------------------------------------- noannoyances = trigger_ff_script:new({}) function noannoyances:onbuild( build_entity ) return EVENT_DISALLOWED end function noannoyances:onexplode( explode_entity ) if IsGrenade( explode_entity ) then return EVENT_DISALLOWED end return EVENT_ALLOWED end function noannoyances:oninfect( infect_entity ) return EVENT_DISALLOWED end no_annoyances = noannoyances spawn_protection = noannoyances |
|
10-02-2007, 10:40 PM | #2 |
Nutcracker
|
I think the onexplode callback is broken somehow. Hopefully fixed in the next version. The noannoyances entity prevents building sentry guns on it, but grenades still explode.
|
|
10-03-2007, 01:08 AM | #3 |
Join Date: Sep 2007
Posts Rated Helpful 0 Times
|
Make sure you have the "everything" flag checked in the trigger_ff_script.
|
|
10-03-2007, 01:19 AM | #4 |
Join Date: Sep 2007
Posts Rated Helpful 0 Times
|
^that worked!! thanks
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|