Stuff Do-er
Lua Team Wiki Team Fortress Forever Staff
Join Date: Mar 2007
Location: Northern California
Class/Position: Rallygun Shooter Gametype: Conc tag (you just wait) Affiliations: Mustache Brigade Posts Rated Helpful 352 Times
|
I remember this. Taking a quick look at the Lua, nothing looks all that wrong. Some redundant/unnecessary code, though. Silly early mapmakers that made nonsensical Lua scripts.
Try this:
Code:
-- ff_amped.lua
-- Author: NzNexus (a.k.a Ambex)
-----------------------------------------------------------------------------
-- includes
-----------------------------------------------------------------------------
IncludeScript("base_respawnturret");
IncludeScript("base_ctf")
-----------------------------------------------------------------------------
-- global overrides
-----------------------------------------------------------------------------
POINTS_PER_CAPTURE = 10
FLAG_RETURN_TIME = 60
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-- backpacks smallpack1=bottomfloor smallpack2=middlefloor smallpack3=upperfloor
-----------------------------------------------------------------------------
redsmallpack1 = genericbackpack:new({
grenades = 100,
bullets = 100,
nails = 100,
shells = 100,
rockets = 100,
gren1 = 1,
gren2 = 1,
cells = 200,
armor = 100,
health = 100,
respawntime = 30,
model = "models/items/backpack/backpack.mdl",
materializesound = "Item.Materialize",
touchsound = "Backpack.Touch",
touchflags = {AllowFlags.kRed},
botgoaltype = Bot.kBackPack_Ammo
})
function redsmallpack1:dropatspawn() return false end
redsmallpack2 = genericbackpack:new({
grenades = 100,
bullets = 100,
nails = 100,
shells = 100,
rockets = 100,
gren1 = 1,
gren2 = 1,
cells = 200,
armor = 100,
health = 100,
respawntime = 30,
model = "models/items/backpack/backpack.mdl",
materializesound = "Item.Materialize",
touchsound = "Backpack.Touch",
touchflags = {AllowFlags.kRed},
botgoaltype = Bot.kBackPack_Ammo
})
function redsmallpack2:dropatspawn() return false end
redsmallpack3 = genericbackpack:new({
grenades = 100,
bullets = 100,
nails = 100,
shells = 100,
rockets = 100,
gren1 = 1,
gren2 = 1,
cells = 200,
armor = 100,
health = 100,
respawntime = 30,
model = "models/items/backpack/backpack.mdl",
materializesound = "Item.Materialize",
touchsound = "Backpack.Touch",
touchflags = {AllowFlags.kRed},
botgoaltype = Bot.kBackPack_Ammo
})
function redsmallpack3:dropatspawn() return false end
bluesmallpack1 = genericbackpack:new({
grenades = 100,
bullets = 100,
nails = 100,
shells = 100,
rockets = 100,
gren1 = 1,
gren2 = 1,
cells = 200,
armor = 100,
health = 100,
respawntime = 30,
model = "models/items/backpack/backpack.mdl",
materializesound = "Item.Materialize",
touchsound = "Backpack.Touch",
touchflags = {AllowFlags.kBlue},
botgoaltype = Bot.kBackPack_Ammo
})
function bluesmallpack1:dropatspawn() return false end
bluesmallpack2 = genericbackpack:new({
grenades = 100,
bullets = 100,
nails = 100,
shells = 100,
rockets = 100,
gren1 = 1,
gren2 = 1,
cells = 200,
armor = 100,
health = 100,
respawntime = 30,
model = "models/items/backpack/backpack.mdl",
materializesound = "Item.Materialize",
touchsound = "Backpack.Touch",
touchflags = {AllowFlags.kBlue},
botgoaltype = Bot.kBackPack_Ammo
})
function bluesmallpack2:dropatspawn() return false end
bluesmallpack3 = genericbackpack:new({
grenades = 100,
bullets = 100,
nails = 100,
shells = 100,
rockets = 100,
gren1 = 1,
gren2 = 1,
cells = 200,
armor = 100,
health = 100,
respawntime = 30,
model = "models/items/backpack/backpack.mdl",
materializesound = "Item.Materialize",
touchsound = "Backpack.Touch",
touchflags = {AllowFlags.kBlue},
botgoaltype = Bot.kBackPack_Ammo
})
function bluesmallpack3:dropatspawn() return false end
Can't test it myself until later. I could clean it up a bit more once I can test it as well. Like 99% of that backpack code is repeated for no reason.
|