01-06-2009, 02:12 PM | #1 |
Pub Allstar!
Beta Tester
Join Date: Aug 2008
Class/Position: under en kvinna Gametype: Capture the Flag Affiliations: Eternal Order, Must be h4x, Mono's happy funtime. Posts Rated Helpful 0 Times
|
[REQ] Resupply brush tutorial
can someone point me to a tut, or offer some advice on resupply brushes such as those in ff_aardvark. Thanks!
|
|
01-06-2009, 05:16 PM | #2 |
Banned
Join Date: Sep 2008
Class/Position: Soldier Gametype: AVD Affiliations: TALOS Posts Rated Helpful 5 Times
|
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 }) Last edited by Bridget; 01-07-2009 at 09:26 AM. |
|
01-06-2009, 05:36 PM | #3 |
Pub Allstar!
Beta Tester
Join Date: Aug 2008
Class/Position: under en kvinna Gametype: Capture the Flag Affiliations: Eternal Order, Must be h4x, Mono's happy funtime. Posts Rated Helpful 0 Times
|
fabulous. thanks!
|
|
01-06-2009, 06:18 PM | #4 |
D&A Member
Wiki Team Fortress Forever Staff Join Date: Apr 2007
Posts Rated Helpful 31 Times
|
Nice tutorial, Bridget. I'm linking this in the "All Your Mapping Needs" thread.
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|