Strange issue re-ocurring

I have a system where my main actor activates an ink screen. The ink screen is supposed to destroy after 4 seconds (although a couple other situations can disable the effect). The other situations work fine but the timer effect does not seem to be reliable. I had it working 100% last night and now all the sudden it is no longer working properly. The ink screen effect does not seem to end unless I use one of the alternative methods to disable it. What is really baffling is that it worked perfectly last night so no idea why it doesn't now. Here is the core of the program. I disabled "run to completion" because I want the other behaviors to be able to interrupt the timer...

Comments

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069

    @sinbot said:
    I have a system where my main actor activates an ink screen. The ink screen is supposed to destroy after 4 seconds (although a couple other situations can disable the effect). The other situations work fine but the timer effect does not seem to be reliable. I had it working 100% last night and now all the sudden it is no longer working properly. The ink screen effect does not seem to end unless I use one of the alternative methods to disable it. What is really baffling is that it worked perfectly last night so no idea why it doesn't now. Here is the core of the program. I disabled "run to completion" because I want the other behaviors to be able to interrupt the timer...

    That logic doesn't make any sense. Logic is iterated in an actor from top to bottom (although it's not guaranteed to).

    The rule you made can only trigger when the conditions are SQUIRT = true, but iteratively, the timer changes SQUIRT to false BEFORE the destroy behavior.

    Because your rule now no longer is valid due to it being false, the logic will no longer trigger to destroy.

    Run to completion works because it does just that, without it you aren't going to guarantee that logic triggers outside of the conditions of the encompassing rule.

    You need to rethink how to trigger this logic.

    You could try making that timer change alpha to 0, and then take that otherwise rule and move it out on it's own. Change the condition on the otherwise rule to

    when alpha=0
    change squirt to false
    destroy this actor

    I think this would work. But it depends on the how the rest of your logic is set.

    Follow us: Twitter - Website

  • sinbotsinbot Member Posts: 232

    Yeah I actually sort of noticed that shortly after I posted. Here's the revision that seems to work perfectly now.

    @AlchimiaStudios said:

    @sinbot said:
    I have a system where my main actor activates an ink screen. The ink screen is supposed to destroy after 4 seconds (although a couple other situations can disable the effect). The other situations work fine but the timer effect does not seem to be reliable. I had it working 100% last night and now all the sudden it is no longer working properly. The ink screen effect does not seem to end unless I use one of the alternative methods to disable it. What is really baffling is that it worked perfectly last night so no idea why it doesn't now. Here is the core of the program. I disabled "run to completion" because I want the other behaviors to be able to interrupt the timer...

    That logic doesn't make any sense. Logic is iterated in an actor from top to bottom (although it's not guaranteed to).

    The rule you made can only trigger when the conditions are SQUIRT = true, but iteratively, the timer changes SQUIRT to false BEFORE the destroy behavior.

    Because your rule now no longer is valid due to it being false, the logic will no longer trigger to destroy.

    Run to completion works because it does just that, without it you aren't going to guarantee that logic triggers outside of the conditions of the encompassing rule.

    You need to rethink how to trigger this logic.

    You could try making that timer change alpha to 0, and then take that otherwise rule and move it out on it's own. Change the condition on the otherwise rule to

    when alpha=0
    change squirt to false
    destroy this actor

    I think this would work. But it depends on the how the rest of your logic is set.

Sign In or Register to comment.