TR1X icon indicating copy to clipboard operation
TR1X copied to clipboard

Feature request: Prevent music triggers from playing again after loading a save file

Open aredfan opened this issue 3 years ago • 6 comments

I've noticed that music triggers can play more than once, it goes like this:

  1. Lara steps on a trigger, music plays.
  2. The player creates a save file afterwards.
  3. The player loads the save file.
  4. If Lara treads on the same trigger again, the music plays again.

This is noticable in areas where Lara have to do backtracking.

aredfan avatar Jan 22 '22 16:01 aredfan

This error cannot be fully fixed. It also manifests in a slightly different form:

  1. Lara steps on a tile triggering music track A.
  2. Lara goes elsewhere and steps on a tile triggering music track B (this includes collecting a secret, for instance).
  3. Lara goes back to the first tile. The game shouldn't play the music track again, but it does.

The reason for this is because the game remembers which track was played recently and even if the author of the level forgot to mark given trigger as one-shot, this logic ensures that we do not play the same music track twice in a row.

To fix this, we have two solutions: the first is to find every broken trigger in each level and mark it as a one-shot. Not very sustainable or elegant in my opinion. A second, more sensible approach would be to add to the save file information about what track was last played, letting the in-game protection against playing the same track twice in a row continue doing its job even after save and reload. This of course needs #277 as everything that has to do with saves.

rr- avatar Jan 22 '22 17:01 rr-

@rr- maybe marking every trigger as one shot is now possible? We already traverse them all to do stat calculation. Let me know what you think.

walkawayy avatar Feb 11 '22 00:02 walkawayy

I haven't thought about this. Won't this lead to regressions?

rr- avatar Feb 11 '22 10:02 rr-

How so? Aren't all music triggers supposed to be played only once?

walkawayy avatar Feb 11 '22 17:02 walkawayy

Custom levels with Lara saying "I should revisit this area later" before a flip?

rr- avatar Feb 11 '22 18:02 rr-

For custom levels, could people just create two triggers in the same place, to be used up in concession of game progression?

Richard-L avatar Feb 16 '22 10:02 Richard-L