01-10-2011, 12:08 AM | #1 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
conc_map LUA...
i have a concmap that i lost the lua to when my comp crashed a while back. can somebody please help me?
blue team - scout, medic - invincible(so red team can't hurt them[quad?]) red team - demo, pyro, solly and engi - quad i have trigger brushes for constant resupply named "resupplyzone", is this needed or is there a way to constantly check and resupply without a trigger?(i'm fucking ignorant when it comes to lua's....) take away secondary nades on red team custom locs, i think i can add these to it. theme i'm going with:
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
01-10-2011, 04:40 AM | #2 |
Banned
Join Date: Sep 2008
Class/Position: Soldier Gametype: AVD Affiliations: TALOS Posts Rated Helpful 5 Times
|
I hope I did the logic right for the damage bit. I foresee a fuck-up.
BASE Code:
IncludeScript("base_teamplay") function startup() SetTeamName(Team.kBlue, "Team Conc") SetTeamName(Team.kRed, "Team Quad") SetPlayerLimit(Team.kYellow, -1) SetPlayerLimit(Team.kGreen, -1) SetPlayerLimit(Team.kRed, 0) SetPlayerLimit(Team.kBlue, 0) local team = GetTeam(Team.kRed) team:SetClassLimit(Player.kScout, 0) team:SetClassLimit(Player.kSniper, -1) team:SetClassLimit(Player.kSoldier, -1) team:SetClassLimit(Player.kDemoman, -1) team:SetClassLimit(Player.kMedic, 0) team:SetClassLimit(Player.kHwguy, -1) team:SetClassLimit(Player.kPyro, -1) team:SetClassLimit(Player.kSpy, -1) team:SetClassLimit(Player.kEngineer, -1) team:SetClassLimit(Player.kCivilian, -1) team = GetTeam(Team.kRed) team:SetClassLimit(Player.kScout, -1) team:SetClassLimit(Player.kSniper, -1) team:SetClassLimit(Player.kSoldier, 0) team:SetClassLimit(Player.kDemoman, 0) team:SetClassLimit(Player.kMedic, -1) team:SetClassLimit(Player.kHwguy, -1) team:SetClassLimit(Player.kPyro, 0) team:SetClassLimit(Player.kSpy, -1) team:SetClassLimit(Player.kEngineer, 0) team:SetClassLimit(Player.kCivilian, -1) end function player_ondamage(this, damageinfo) if not damageinfo then return end local player = CastToPlayer(this) local attacker = damageinfo:GetAttacker() damageinfo:SetDamage(0) if IsPlayer(attacker) then attacker = CastToPlayer(attacker) if attacker:GetTeamId() ~= player:GetTeamId() then damageinfo:SetDamageForce(Vector(0,0,0)) else local DamageForce = damageinfo:GetDamageForce() damageinfo:SetDamageForce(Vector(DamageForce.x * 4,DamageForce.y * 4,DamageForce.z * 4)) end end end function player_spawn(this) local player = CastToPlayer(this) if player:GetTeamId() == Team.kRed then player:RemoveAmmo(Ammo.kGren2, 4) end return true end Code:
resupplyzone = trigger_ff_script:new({}) function resupplyzone:ontrigger(trigger_entity) if IsPlayer(trigger_entity) then local player = CastToPlayer(trigger_entity) if player:GetClass() == Player.kMedic or player:GetClass() == Player.kScout then player:GiveAmmo(Ammo.kGren1, 0) player:GiveAmmo(Ammo.kGren2, 0) else player:GiveAmmo(Ammo.kRockets, 0) player:GiveAmmo(Ammo.kGrenades, 0) player:GiveAmmo(Ammo.kCells, 0) player:GiveAmmo(Ammo.kGren1, 0) player:GiveAmmo(Ammo.kGren2, 0) end ApplyToPlayer(player, {AT.kReloadClips}) end end Code:
function resupplyzone:ontrigger(trigger_entity) Code:
function resupplyzone:ontouch(trigger_entity) Code:
function ResupplyLoop() local b_team = Collection() b_team:GetByFilter({ CF.kPlayers, CF.kTeamBlue }) local r_team = Collection() r_team:GetByFilter({ CF.kPlayers, CF.kTeamRed }) for temp in b_team.items do local player = CastToPlayer(temp) if player then player:GiveAmmo(Ammo.kGren1, 0) player:GiveAmmo(Ammo.kGren2, 0) end end for temp in r_team.items do local player = CastToPlayer(temp) if player then player:GiveAmmo(Ammo.kRockets, 0) player:GiveAmmo(Ammo.kGrenades, 0) player:GiveAmmo(Ammo.kCells, 0) player:GiveAmmo(Ammo.kGren1, 0) player:GiveAmmo(Ammo.kGren2, 0) end end ApplyToAll({AT.kReloadClips}) end Code:
AddScheduleRepeating("ResupplyLoop", 1, ResupplyLoop) |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|