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

Disable the intro spawn trigger for the newborn alpha if already dead #319

Merged
merged 2 commits into from
Apr 14, 2024

Conversation

dyceron
Copy link
Collaborator

@dyceron dyceron commented Apr 13, 2024

Fixes #318

@dyceron dyceron requested a review from ThanatosGit April 13, 2024 23:38
@dyceron
Copy link
Collaborator Author

dyceron commented Apr 13, 2024

Tested this a couple of times and the Alpha never respawned.

@ThanatosGit
Copy link
Collaborator

Hmmm for me the alpha still respawns if you go there from the front.
I added some output. As you can see the Dead callback is not called when you go there from the front and the trigger seems to be still active.
It's only called from the back and - as you can see from the output - after I killed the alpha the first time and being at the missile block.

@ThanatosGit Nice typos in the log messages 🙃

2024-04-14.08-34-33.mp4

image

@dyceron
Copy link
Collaborator Author

dyceron commented Apr 14, 2024

That's so odd. This Alpha is always causing issues.

@ThanatosGit
Copy link
Collaborator

Game.SetInGameMusicState("RELAX")
if scenario == "s000_surface" then
Game.DisableEntity("TG_Intro_Alpha")
Scenario.WriteToBlackboard("alpha_killed", "b", true)
end
Game.SaveGame("checkpoint", "AfterNewAbilityAcquired", "", true)

Oops, this should be Game.DisableTrigger("TG_Intro_Alpha"). Then no other change should be required.

@dyceron
Copy link
Collaborator Author

dyceron commented Apr 14, 2024

If you could test this for me, that'd be great.

Copy link
Collaborator

@ThanatosGit ThanatosGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works. The changes in s000_surface.lua are not required because DisableTrigger from the metroid template is persistent.

@dyceron
Copy link
Collaborator Author

dyceron commented Apr 14, 2024

Wait so should anything else still be changed or those this good to go?

@ThanatosGit
Copy link
Collaborator

Wait so should anything else still be changed or those this good to go?

Isn't that twice the same case 😛?
Feel free to merge it that way.

The changs in s000_surface.lua didn't make a difference for me.
Kinda makes sense?
We never set the AlphaIntroPlayed property because we completly block playing that cutscene.
The additional part in s000_surface.OnEnter_Alpha_001_Dead is alredy handled by the metroid_template.lua.
OnDNAAbsorbAnimation should also never be executed because we don't play this animation. That's also the reason why the alpha_killed part is in the metroid_template.lua.

@dyceron dyceron merged commit 7121167 into main Apr 14, 2024
5 checks passed
@dyceron dyceron deleted the fix-newborn-respawn branch April 14, 2024 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alpha newborn can respawn
2 participants