Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

Reply
 
Thread Tools Display Modes
Old 08-26-2010, 04:06 PM   #1
DeToXxX
 
DeToXxX's Avatar
 
Join Date: Jul 2007
Location: Staten Island, NY
Class/Position: Offense
Gametype: CTF
Affiliations: [TALOS] .t5
Posts Rated Helpful 3 Times
SQUEEEEEEEEEK

I was trying to use part of a lua you made for GT for ff_r123 and it works fine for stopping the bullets from going through. But, the only issue is when you attempt to walk through it crashes HL. Here is script:

Code:
------------------------------------------
-- remove projectiles (Credit to Squeek)
-- http://forums.fortress-forever.com/showthread.php?t=19904
------------------------------------------

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) or IsGrenade(allowed_entity) or IsTurret(allowed_entity) or IsDispenser(allowed_entity) or IsSentrygun(allowed_entity) or IsDetpack(allowed_entity)
end
DeToXxX is offline   Reply With Quote


Old 08-26-2010, 04:43 PM   #2
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 probably don't have the trigger named properly, so it's not using the allowed function and therefore trying to remove a player. The trigger should be named "remove_projectiles".

That's my guess.
__________________
#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
squeek. is offline   Reply With Quote


Old 08-28-2010, 12:04 PM   #3
DeToXxX
 
DeToXxX's Avatar
 
Join Date: Jul 2007
Location: Staten Island, NY
Class/Position: Offense
Gametype: CTF
Affiliations: [TALOS] .t5
Posts Rated Helpful 3 Times
No, still doesn't work. Any word when 2.5 will out?
DeToXxX is offline   Reply With Quote


Old 08-28-2010, 02:06 PM   #4
Elmo
Gets tickled by FF
Fortress Forever Staff
 
Elmo's Avatar
 
Join Date: Jun 2007
Location: UK
Class/Position: Med Solly HW
Gametype: Any/CTF
Posts Rated Helpful 41 Times
HAH!
__________________
Support FF:
Done: ff_monkey
Done: ff_bases
Done: ff_warpath
Forever Doing: ff_medieval (beta#99999999)
Elmo is offline   Reply With Quote


Old 08-31-2010, 07:53 PM   #5
KubeDawg
Nade Whore
Server Owner
Beta Tester
 
KubeDawg's Avatar
 
Join Date: Sep 2007
Location: Oklahoma
Class/Position: Scout/Soldier
Gametype: CTF/TDM
Affiliations: blunt. Moto
Posts Rated Helpful 128 Times
Yeah, WhenFF2.5WillOut?
__________________
Moto's Funhouse | Dallas, TX - 74.91.114.247:27015

ff_plunder - Complete
KubeDawg is offline   Reply With Quote


Old 08-31-2010, 08:27 PM   #6
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.
Try using this code instead for testing:
Code:
remove_projectiles = trigger_ff_script:new({ })

function remove_projectiles:allowed(allowed_entity)
	ConsoleToAll("[script] Allowed function called...")
	return false
end
If your game still crashes, then you definitely did not name the trigger properly or something similar. If your console gets spammed with "[script] Allowed function called...", then it's something with the Lua code and we can go from there.
__________________
#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.; 08-31-2010 at 08:27 PM.
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 12:17 PM.


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