View Single Post
Old 02-02-2010, 02:51 AM   #23
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.
Quote:
Originally Posted by Pon View Post
It's also something I've wondered if it's possible to enable (in an extremely hacky way) in Lua. I may experiment for the hell of it...
I was thinking the same thing. It's definitely possible (and wouldn't be too hard).

Semi-pseudo-code:
Code:
player_ondamage( player, damageinfo )
  -- if on the same team and not damaging self
  if victim:GetTeamId() == attacker:GetTeamId() and not victim:GetId() == attacker:GetId() then
    -- get damage
    damage = damageinfo:GetDamage()
    -- perhaps apply some reduction to damage (maybe based on armor type?)
    damage = damage / 2
    -- strip armor
    victim:RemoveArmor( damage )
    -- already did the stripping, don't damage further
    damageinfo:SetDamage( 0 )
  end
end
It'd require friendly fire to be on to work, though.
__________________
#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.; 02-02-2010 at 02:54 AM.
squeek. is offline   Reply With Quote