Fortress Forever

Go Back   Fortress Forever > Editing > Mapping

Reply
 
Thread Tools Display Modes
Old 10-02-2007, 09:58 PM   #1
public_slots_free
 
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
I have tried naming it spawn_protection and nogrens. Nothing works. Any help is appreciated. I need it to work for gren2 as well. My LUA includes base_ctf and that includes base_teamplay so i dont need to include base_teamplay right? It doesnt matter though cuz i tried to just include teamplay myself and still doesnt work.
public_slots_free is offline   Reply With Quote


Old 10-02-2007, 10:40 PM   #2
A1win
Nutcracker
 
A1win's Avatar
 
Join Date: Sep 2007
Location: Kuopio, Finland
Posts Rated Helpful 0 Times
Send a message via MSN to A1win
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.
A1win is offline   Reply With Quote


Old 10-03-2007, 01:08 AM   #3
NyRoNiC
 
Join Date: Sep 2007
Posts Rated Helpful 0 Times
Make sure you have the "everything" flag checked in the trigger_ff_script.
NyRoNiC is offline   Reply With Quote


Old 10-03-2007, 01:19 AM   #4
public_slots_free
 
Join Date: Sep 2007
Posts Rated Helpful 0 Times
^that worked!! thanks
public_slots_free is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:16 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.