Bridget |
01-06-2009 04:16 PM |
I'm assume you mean the glass pads in the respawn that resupply you? If so, this is done via lua. (create a text file in the same directory as your map in the FortressForever mod folder under steamapps and name it x.lua, where x is the name of your map — the same name as the .bsp it was saved under.)
Create a brush over the glass pad (which is created in hammer; standard brush work.). Select your brush. Open the texture application tool, hit browse, type 'trigger' into the texture search box. Select the orange texture with 'trigger' written on it. You can alter the size of the brush depending on the respawn zone or height depending upon if you want players to have to land on it or give them the ability to jump through it (such as the vertical-respawns on startec.) Open the properties for this brush (double click it or right click in a grid window and select properties) and set it as a trigger_ff_script (hit apply to set it) and name it either blue_resup or red_resup depending on team that can use it. [NOTE: If you can't set it to trigger_ff_script via properties, hit ctrl-t with it selected to do so.]
Code:
function resup:ontouch( touch_entity )
if IsPlayer( touch_entity ) then
local player = CastToPlayer( touch_entity )
if player:GetTeamId() == self.team then
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 )
end
end
end
blue_resup = resup:new({ team = Team.kBlue })
red_resup = resup:new({ team = Team.kRed })
resup = trigger_ff_script:new({ team = Team.kUnassigned })
Paste that into the .lua file and save. It should work from there. You can use the lua to edit what you want to add to the player or even remove from the player. Note, this was copied directly from the aardvark lua, because I don't remember the functions off the top of my head.
|