Fortress Forever

Go Back   Fortress Forever > Editing > Mapping

Reply
 
Thread Tools Display Modes
Old 06-17-2009, 10:49 PM   #1
Bridget
Banned
 
Bridget's Avatar
 
Join Date: Sep 2008
Class/Position: Soldier
Gametype: AVD
Affiliations: TALOS
Posts Rated Helpful 5 Times
Stopping projectiles via LUA?

Is there any way to stop rockets from passing a trigger-textured area via LUA?
Players must be able to pass, but not rockets.
Bridget is offline   Reply With Quote


Old 06-18-2009, 12:52 AM   #2
Crazycarl
D&A Member
Wiki Team
Fortress Forever Staff
 
Crazycarl's Avatar
 
Join Date: Apr 2007
Posts Rated Helpful 31 Times
I think trigger_ff_clip will do this. It doesn't do everything it's supposed to do, but it does block projectiles.
Crazycarl is offline   Reply With Quote


Old 06-18-2009, 12:54 AM   #3
squeek.
Stuff Do-er
Lua Team
Wiki Team
Fortress Forever Staff
 
squeek.'s Avatar
 
Join Date: Mar 2007
Location: Northern California
Class/Position: Rallygun Shooter
Gametype: Conc tag (you just wait)
Affiliations: Mustache Brigade
Posts Rated Helpful 352 Times
Send a message via AIM to squeek.
You can use a trigger_remove (check "Everything" and then use the code below to only remove projectiles) or a trigger_ff_clip.

Trigger_remove (named projectile_remove)
Code:
remove_projectiles = trigger_ff_script:new({ })

function remove_projectiles:allowed(allowed_entity)
	if IsNotProjectile(allowed_entity) then
		return false
	end
	return true
end

function IsNotProjectile( allowed_entity )
	return IsPlayer(allowed_entity) || IsGrenade(allowed_entity) || IsTurret(allowed_entity) || IsDispenser(allowed_entity) || IsSentrygun(allowed_entity) || IsDetpack(allowed_entity)
end
Trigger_ff_clip (named projectile_clip)
Code:
projectile_clip = trigger_ff_clip:new({ clipflags = {ClipFlags.kClipProjectiles} })
Not sure if trigger_ff_clip works 100% correctly. Trigger_remove will remove the projectile completely, and trigger_ff_clip will act as a wall.
__________________
#FF.Pickup ¤ Fortress-Forever pickups

My Non-official Maps
Released FF_DM_Squeek - FF_2Mesa3_Classic - FF_Siege_Classic
Beta FF_Myth - FF_Redlight_Greenlight

Sick of the people on the internet, always moanin'. They just moan.
- Karl Pilkington

Last edited by squeek.; 06-18-2009 at 12:54 AM.
squeek. is offline   Reply With Quote


Old 06-18-2009, 12:59 AM   #4
Bridget
Banned
 
Bridget's Avatar
 
Join Date: Sep 2008
Class/Position: Soldier
Gametype: AVD
Affiliations: TALOS
Posts Rated Helpful 5 Times
Thanks, and instead of making a new thread.. I have another question.

Currently, I have two brushes set to trigger_teleport. One to teleport to red side, one to teleport to blue side. They both work, but not as I want. So, how would I go about (through lua) only allowing (if possible) the teleporter to work if the person who enters the teleporter shares the same team as the teleporter?
Bridget is offline   Reply With Quote


Old 06-18-2009, 01:38 AM   #5
squeek.
Stuff Do-er
Lua Team
Wiki Team
Fortress Forever Staff
 
squeek.'s Avatar
 
Join Date: Mar 2007
Location: Northern California
Class/Position: Rallygun Shooter
Gametype: Conc tag (you just wait)
Affiliations: Mustache Brigade
Posts Rated Helpful 352 Times
Send a message via AIM to squeek.
Code:
team_only = trigger_ff_script:new({ team = Team.kUnassigned })

function team_only:allowed( allowed_entity )
	if IsPlayer( allowed_entity ) then
		local player = CastToPlayer( allowed_entity )
		-- return true if the player is on the right team
		return player:GetTeamId() == self.team 
	end
	return EVENT_DISALLOWED
end

blue_only = team_only:new({ team = Team.kBlue })
red_only = team_only:new({ team = Team.kRed })
Name the trigger_teleports red_only and blue_only
__________________
#FF.Pickup ¤ Fortress-Forever pickups

My Non-official Maps
Released FF_DM_Squeek - FF_2Mesa3_Classic - FF_Siege_Classic
Beta FF_Myth - FF_Redlight_Greenlight

Sick of the people on the internet, always moanin'. They just moan.
- Karl Pilkington

Last edited by squeek.; 06-18-2009 at 01:38 AM.
squeek. 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 09:39 AM.


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