Prevent Action from firing when cutscene starts at time > 0?

Slate Forums Support Prevent Action from firing when cutscene starts at time > 0?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2524
    dgoyette
    Participant

    I have a Slate Action that displays a subtitle when the action is triggered. For a longer cutscene, I’m trying to resume playing the cutscenes somewhere in the middle of the cutscene (instead of at time = 0). I’m finding that when the cutscene first starts, Slate is triggering all actions on the first frame. The result is that all of my subtitle actions that occurred earlier than the start time get triggered as soon as the cutscene plays.

    For example, say I display a subtitle every 10 seconds in a cutscene. If I were to start the cutscene at Time = 45 seconds, I’d see 4 subtitles appear immediately upon playing the cutscene.

    I understand why the system works this way, but I was wondering if there was some options I’m missing to get a particular action to ignore that behavior, and not fire when the cutscene is “catching up” with all past events?

     

    Thanks.

    #2529
    Gavalakis
    Keymaster

    Hello,

    This is indeed done by design so that the cutscene is deterministic. You can however use the following code in your custom action clip to avoid it being triggered in such situations:

    Please let me know if that works for you, or if you’d like some other solution.
    Thank you!

    Join us on Discord: https://discord.gg/97q2Rjh

    #2534
    dgoyette
    Participant

    Thanks, that does the trick.

    It does, however, have one downside: If I actually have the clip start at t=0, it will never play that clip, since root.previousTime will be zero in that case. A simple workaround for that is I just won’t put these clips exactly at t=0, and I can put a warning on OnEnter if startTime == 0.

    So, works well for my purposes. Thanks again.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.