Fortress Forever

Go Back   Fortress Forever > Editing > Mapping

Reply
 
Thread Tools Display Modes
Old 09-20-2007, 07:36 AM   #1
Doughnut-4|4-
 
Join Date: May 2007
Posts Rated Helpful 0 Times
Tutorial on Custom Supply Bags

[Edit]
This tutorial goes out to Kam whom told me where the endless supply of LUA references were located:
FortressForever\maps\includes

Here is a sample of what to put in your LUA:
Code:
blue_bagcustom = genericbackpack:new({ 
	health = 100,
	armor = 300,
	grenades = 0,
	bullets = 300,
	nails = 300,
	rockets = 300,
	cells = 100,
	detpacks = 0,
	gren1 = 0,
	gren2 = 0,
	respawntime = 5,
	model = "models/items/backpack/backpack.mdl",
	materializesound = "Item.Materialize",
	touchsound = "Backpack.Touch",
	notallowedmsg = "#FF_NOTALLOWEDPACK",
	touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kBlue}
})
Just dump that in your map.LUA and edit the numbers and/or team colors and you're set. My maps coming soon!

Last edited by Doughnut-4|4-; 09-21-2007 at 08:01 AM.
Doughnut-4|4- is offline   Reply With Quote


Old 09-20-2007, 10:11 AM   #2
trepid_jesse
Fortress Forever Staff
 
trepid_jesse's Avatar
 
Join Date: Jan 2005
Location: Texas
Posts Rated Helpful 0 Times
I don't even understand your question.

"...the Lua command for team bags."

Um, what? So, are you wanting to make bags for certain teams?

Then set the "touch" flag to make it only available for that team.

Code:
touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kRed}
__________________
Support FF:

Trepid, what?
trepid_jesse is offline   Reply With Quote


Old 09-20-2007, 10:46 AM   #3
Doughnut-4|4-
 
Join Date: May 2007
Posts Rated Helpful 0 Times
Here's what I got that's not working... It's late and I'm really starting to miss the old Hammer entities. I don't know how to edit your code... I want my tabs back damn it.

blue_bagcustom = genericbackpack:new({
health = 100,
armor = 300,
bullets = 300,
nails = 300,
shells = 300,
rockets = 50,
cells = 50,
model = "models/items/backpack/backpack.mdl",
materializesound = "Item.Materialize",
touchsound = "Backpack.Touch",
touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kBlue}
})
Doughnut-4|4- is offline   Reply With Quote


Old 09-20-2007, 11:07 AM   #4
trepid_jesse
Fortress Forever Staff
 
trepid_jesse's Avatar
 
Join Date: Jan 2005
Location: Texas
Posts Rated Helpful 0 Times
And are you including base_teamplay?
__________________
Support FF:

Trepid, what?
trepid_jesse is offline   Reply With Quote


Old 09-20-2007, 11:13 AM   #5
Doughnut-4|4-
 
Join Date: May 2007
Posts Rated Helpful 0 Times
This maybe a stupid question but why would I need "base_teamplay" when I got "base_ctf". Thanks for the help. I need sleep, but I'll post tomorrow if that doesn't fix all my troubles.
Doughnut-4|4- is offline   Reply With Quote


Old 09-20-2007, 11:19 AM   #6
trepid_jesse
Fortress Forever Staff
 
trepid_jesse's Avatar
 
Join Date: Jan 2005
Location: Texas
Posts Rated Helpful 0 Times
I didn't know you were using base_ctf, and base_teamplay contains the genericbackpack you're using.

So, no, you don't need to explicitly include base_teamplay being that base_ctf does it for you.
__________________
Support FF:

Trepid, what?
trepid_jesse is offline   Reply With Quote


Old 09-21-2007, 01:15 AM   #7
Doughnut-4|4-
 
Join Date: May 2007
Posts Rated Helpful 0 Times
I was up all night trying to figure out LUAs for supply bags, and after countless hours I failed. So umm... please help so I can release my map. I know someone has to know how to make custom bags. Are LUAs so difficult I can't even make a baggie? Frustration does not begin to describe my state. Thanks for whatever help you give.
Doughnut-4|4- is offline   Reply With Quote


Old 09-21-2007, 08:02 AM   #8
Doughnut-4|4-
 
Join Date: May 2007
Posts Rated Helpful 0 Times
Thanks Kam! I got it working with help. Tutorial posted in first post for anyone who cares.
Doughnut-4|4- is offline   Reply With Quote


Old 09-21-2007, 09:18 AM   #9
stino
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
its better you make your bags neutral and create a red_ and blue_ by duplicating the bag and changing the touchflags with a lua bagname:new({touchflags = {Allow.....}})
stino is offline   Reply With Quote


Reply


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

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 03:11 PM.


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