Fortress Forever

Go Back   Fortress Forever > Editing > Mapping

Reply
 
Thread Tools Display Modes
Old 01-06-2009, 01:12 PM   #1
MonoXideAtWork
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!
MonoXideAtWork is offline   Reply With Quote


Old 01-06-2009, 04:16 PM   #2
Bridget
Banned
 
Bridget's Avatar
 
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 })
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.

Last edited by Bridget; 01-07-2009 at 08:26 AM.
Bridget is offline   Reply With Quote


Old 01-06-2009, 04:36 PM   #3
MonoXideAtWork
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!
MonoXideAtWork is offline   Reply With Quote


Old 01-06-2009, 05:18 PM   #4
Crazycarl
D&A Member
Wiki Team
Fortress Forever Staff
 
Crazycarl's Avatar
 
Join Date: Apr 2007
Posts Rated Helpful 31 Times
Nice tutorial, Bridget. I'm linking this in the "All Your Mapping Needs" thread.
Crazycarl is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 08:27 PM.


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