Thread: (Request) Removing concs
View Single Post
Old 05-31-2010, 08:58 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.
Remove concs on spawn:
Code:
function player_spawn( player_entity ) 
   local player = CastToPlayer( player_entity ) 

   player:AddHealth( 400 ) 
   player:AddArmor( 400 ) 

   player:AddAmmo( Ammo.kNails, 400 ) 
   player:AddAmmo( Ammo.kShells, 400 ) 
   player:AddAmmo( Ammo.kRockets, 400 ) 
   player:AddAmmo( Ammo.kCells, 400 ) 

   if player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic then
      player:RemoveAmmo( Ammo.kGren2, 4 )
   end
end
Hmm.. for the not giving concs on cap... try this:
Code:
local basecap:oncapture_base = basecap:oncapture
function basecap:oncapture(player, item)
	basecap:oncapture_base( player, item )
	
	if player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic then player:RemoveAmmo( Ammo.kGren2, 4 ) end
end
I haven't tested either of them, but hopefully they work. The second one is particularly experimental because the "traditional" method of doing it would be to overwrite basecap:ontrigger which is not a good idea.
__________________
#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.; 05-31-2010 at 09:04 PM.
squeek. is offline   Reply With Quote