Skip to content

Commit

Permalink
Modify loadout after meeting alyx
Browse files Browse the repository at this point in the history
  • Loading branch information
ZehMatt committed Jun 1, 2024
1 parent 166dc02 commit 1f1acba
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion gamemode/gametypes/hl2ep2/mapscripts/ep2_outland_02.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,24 @@ function MAPSCRIPT:PostInit()
for _, v in pairs(ents.FindByClass("info_player_start")) do
if v:HasSpawnFlags(1) then -- Master
v:SetPos(Vector(-2293.175537, -8260.166016, -497.381989))
print("Yep")
end
end

-- Loadout modifier.
local loadoutChange = ents.Create("lambda_lua_logic")
loadoutChange:SetName("lambda_loadout_change")
loadoutChange.OnRunLua = function()
local weps = GAMEMODE:GetMapScript().DefaultLoadout.Weapons
table.insert(weps, "weapon_smg1")
table.insert(weps, "weapon_shotgun")
table.insert(weps, "weapon_pistol")
end
loadoutChange:Spawn()

ents.WaitForEntityByName("trigger_turret2_vcd", function(ent)
ent:Fire("AddOutput", "OnTrigger lambda_loadout_change,RunLua,,0,-1", "0.0")
end)

end

return MAPSCRIPT

0 comments on commit 1f1acba

Please sign in to comment.