09-20-2007, 07:36 AM | #1 |
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} }) Last edited by Doughnut-4|4-; 09-21-2007 at 08:01 AM. |
|
09-20-2007, 10:11 AM | #2 |
Fortress Forever Staff
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} |
|
09-20-2007, 10:46 AM | #3 |
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} }) |
|
09-20-2007, 11:13 AM | #5 |
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.
|
|
09-20-2007, 11:19 AM | #6 |
Fortress Forever Staff
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. |
|
09-21-2007, 01:15 AM | #7 |
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.
|
|
09-21-2007, 08:02 AM | #8 |
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.
|
|
09-21-2007, 09:18 AM | #9 |
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.....}})
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|