Graphics

 View Only
  • 1.  How to create a trigger that will only fire once in Visual Logic

    Posted 04-17-2017 00:59

    Hello all,

    I'm trying to set up a logic that will fire my Scene Director once my remaining video duration goes below 25 frames.

    That on itself is not difficult and I have that working. However, once the remaining time on my video goes below 25 frames it will continuously fire my Scene Director which I don't want. I want it to only be fired once.

    So I tried adding an offset to my duration so once my remaining duration goes below 25frames, my Scene Director is triggered but then it adds an offset to my duration so that the condition is no longer true and the Scene Director no longer receives any triggers. But I can't seem to find a way to have perform a trigger only when a value turns 1.

    So essentially, when I would compare this to scripting I would have a boolean which is set to false. When a variable becomes 1 I set my boolean to true which fires an event that performs an action but also resets the boolean to false so the action only gets triggered once.

    Does anybody have an idea how to accomplish this?

    Thank you,
    Kenneth



  • 2.  RE: How to create a trigger that will only fire once in Visual Logic

    Posted 04-17-2017 16:10
    Could you set it up so that when the SceneDirector is triggered it would set a value of 1 to a variable. Then use the value of this variable as a logic switch. If the value of (variableTXT)<1 then play the Director. Otherwise do nothing. Could that work?
    #XPression


  • 3.  RE: How to create a trigger that will only fire once in Visual Logic

    Posted 04-17-2017 20:21

    Hey Cainnech,

    Is the video variable in length? If not would something like the attached work?


    #XPression


  • 4.  RE: How to create a trigger that will only fire once in Visual Logic

    Posted 04-18-2017 19:26
    Hi Redmile,

    The video is variable in length yes but that is not really an issue because I can put the duration in the scene as a hidden textfield, but your suggestion would have the problem that it get fired multiple times because the condition stays true.
    #XPression


  • 5.  RE: How to create a trigger that will only fire once in Visual Logic

    Posted 04-18-2017 19:38
    @malthepal, thanks for the suggestion. I was trying something similar but where I was using a value to multiply the position of the scenedirector in order to make the condition false, but that results in a "flicker" because the condition alternates between true and false all the time.
    #XPression