Skip to content

Commit

Permalink
Disable the intro spawn trigger for the newborn alpha if already dead (
Browse files Browse the repository at this point in the history
…#319)

* Disable the intro spawn trigger for the alpha if already dead

* DisableTrigger
  • Loading branch information
dyceron authored Apr 14, 2024
1 parent 2a5a0a0 commit 7121167
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/open_samus_returns_rando/files/levels/s000_surface.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function s000_surface.InitFromBlackboard()
Game.SaturateSpawnGroup("SpawnGroup008")
end
if Scenario.ReadFromBlackboard("AlphaIntroPlayed", false) then
Game.DisableEntity("TG_Intro_Alpha")
Game.DisableTrigger("TG_Intro_Alpha")
end
-- if not Blackboard.GetProp("DEFEATED_ENEMIES", "Queen") or not (Blackboard.GetProp("DEFEATED_ENEMIES", "Queen") > 0) then
Game.DisableEntity("LE_Queen_Door")
Expand Down Expand Up @@ -249,6 +249,7 @@ end
function s000_surface.OnEnter_Alpha_001_Dead()
if 0 < Scenario.ReadFromBlackboard("entity_SG_Alpha_001_deaths", 0) then
Game.SetSubAreaCurrentSetup("collision_camera_010", "PostAlpha_001", true)
Game.DisableEntity("TG_Intro_Alpha")
end
end
function s000_surface.OnGenericCrawler_Generated(_ARG_0_, _ARG_1_)
Expand Down Expand Up @@ -523,7 +524,6 @@ function s000_surface.LaunchMeleeTutoCutscene()
end
function s000_surface.OnDnaAbsorbAnimation()
Game.SetInGameMusicState("DEATH")
Game.DisableEntity("TG_Intro_Alpha")
Scenario.WriteToBlackboard("alpha_killed", "b", true)
end
function s000_surface.OnMeleeTutoButtonPressed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function Metroid.RemoveMetroid(_ARG_0_)
end
Game.SetInGameMusicState("RELAX")
if scenario == "s000_surface" then
Game.DisableEntity("TG_Intro_Alpha")
Game.DisableTrigger("TG_Intro_Alpha")
Scenario.WriteToBlackboard("alpha_killed", "b", true)
end
Game.SaveGame("checkpoint", "AfterNewAbilityAcquired", "", true)
Expand Down

0 comments on commit 7121167

Please sign in to comment.