Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix trigger to account for all players #419

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion SCCA_Coop_E03/SCCA_Coop_E03_script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,9 @@ function IntroMission4()
end

function StartMission4()
ScenarioFramework.CreateAreaTrigger(M4IslandApproach, ScenarioUtils.AreaToRect('Aeon_Island_Area'), categories.ALLUNITS, true, false, ArmyBrains[Player1], 1, false)
for _, armyId in ScenarioInfo.HumanPlayers do
ScenarioFramework.CreateAreaTrigger(M4IslandApproach, 'Aeon_Island_Area', categories.ALLUNITS, true, false, ArmyBrains[armyId], 1, false)
end

-- After 4 minutes
ScenarioFramework.CreateTimerTrigger(M4ErisTaunt1, 240)
Expand All @@ -819,6 +821,11 @@ function StartMission4()
end

function M4IslandApproach()
if ScenarioInfo.M4IslandApproachedByPlayers then
return
end
ScenarioInfo.M4IslandApproachedByPlayers = true

ScenarioFramework.Dialogue(OpStrings.E03_M04_020, AddObjectiveM4P2)
end

Expand Down