Forum rules - please read before posting.

Strange ActionList Issue

I'm having an issue where my actionLists in a particular scene aren't doing what they're supposed to and are doing things they shouldn't, under certain circumstances. This will be a little complicated to explain, so please bear with me here. 

Running Unity 2018.2.9f1 (64-bit) and AC 1.65.0

In this scene the player must preform multiple "songs" (a short progression of notes) in a row, in order to progress. When a song is failed, they get kicked back to the previous song. Failing can happen by either hitting the wrong note or running out of time. Each song uses the same timer and the timer is reset at the start of each song. When a song is successfully played, the player progresses to the next song. 

Now everything is working as it should, except for when you run out of time. Even though the exact same thing is happening (running the same actionLists) somehow by running out of time it's making the actions act differently. For example if you fail "song_1", action "Fail_1" runs and then action "song_0" starts. This happens whether you fail by pressing the wrong note or by running out of time. When you fail by pressing the wrong button, everything works. However, when you run out of time the action "song_0" no longer works, even though it is running normally and all variables are correct / everything is reset properly. When I say that the action no longer works, this is the behavior: it fails on pressing the correct note (can be any note in the song, I can't see a pattern to it) and then it'll play the incorrect Fail action (I.E. failing "song_0" plays "Fail_1" when it's supposed to run "Fail_0"). 

I spent the entire day yesterday trying to figure this out, but I can't seem to make sense of why or how this would happen. So I'm not sure if it's an error on my end or a bug in AC. Any insight would be much appreciated. I'm hoping I just overlooked some small detail.

Comments

  • The actions are set up like this:


    Action “song_1” (runs in background)

    Run “timerSet” action (run from start)

    Set variable “K3” = 1

    Check variable “note” = 0

    if 0, then check variable “note” = 0

    if not 0, then check “note” = 1

    if not 1, then run action “Fail_1”(run from start) (stop)

    if 1, then check if “timerSet” is running

    if not, then run action “Fail_1”(run from start) (stop)

    if running, (plays corresponding sound and animation) and set “note” = 0

    Check variable “note” = 0

    if 0, then check variable “note” = 0

    if not 0, then check “note” = 9

    if not 9, then run action “Fail_1”(run from start) (stop)

    if 9, then check if “timerSet” is running

    if not, then run action “Fail_1”(run from start) (stop)

    if running, then kill action “timerSet”, (play sound and animation), set “note” = 0, run action “Win_1” (run from start)


    Action “timerSet” (runs in background)

    Engine Wait X seconds

    Action run “timerFailCheck”


    Action “Fail_1” (pauses gameplay)

    (plays sound and animation)

    Turn off Menu “g”

    Action kill “timerSet”

    Action kill “song_1”

    Variable set “note” = 0

    (plays sounds and animations)

    Engine wait 0.5s

    Action run “song_0”

    Turn on Menu “g”


    Action “Win_1” (pauses gameplay)

    (plays sound and animation)

    Turn off Menu “g”

    Action kill “timerSet”

    Action kill “song_1”

    Variable set “note” = 0

    (plays sounds and animations)

    Engine wait 0.5s

    Action run “song_2”

    Turn on Menu “g”


    Action “timerFailCheck” (pause gameplay)

    Variable check, “K3” = 0

    then, run action “Fail_0” and kill action “song_0”

    Else, Variable check, “K3” = 1

    then, run action “Fail_1” and kill action “song_1”

    ect

  • I'm afraid it's too confusing like this.  You'll have to post screenshots your ActionLists, as it makes it much more clear to see what's going on.

    From what I can tell, there does seem to be some superfluous Actions - e.g. TimerFailCheck runs Fail_1 and kills Song_1, but Fail_1 also kills Song_1.

    TimerSet is also not necessary - if TimerFailCheck is a Cutscene, you can give it a starting delay to prevent it running immediately.  Killing TimerFailCheck during this delay will also prevent it running when the delay expires.

    You also say that the problem lies when Song_0 is running, but don't share any detail about that particular ActionList.

    I'd recommend inserting comments into your Actions that get pushed to the Console window, and enabling the AC Status window to see what's exactly running at all times.  Both of these can be enabled at the bottom of the Settings Manager.
  • I had to add extra kill actions because those actions weren't always being killed correctly so I needed the failsafe (though I think that issue is related to the main issue here).

    The timerSet Action is much more complicated and runs animations and sounds, but the above is a simplified version I experimented with to see if I could narrow down the issue. So it's better organized to run the timerSet and the timerFailCheck separately. Though I have experimented with combining them, with no luck.

    The song, win and fail actions are all set up the same, just with different variables. I do have the active Actions displayed in engine already.

    Additionally, the issue is not with "song_0" or any specific song action, it happens with any of the songs if the timer runs out.

    I've gathered up screenshots of the actions the best I could. Hopefully that's helpful. 

    Like I mentioned above, the systems all work perfectly, variables are correct, actions trigger as they should, the song/note system works as it should, etc. It's only when the timer runs out (whether it's my standard timer as shown below or the simplified version I tried as stated above) is when it causes actions that are running to break in odd ways. 

    song_0:
    image

    song_1_FAIL:
    image

    song_1_WIN:
    image
  • timerSet:
    image

    timerFailCheck:
    image
  • * oh that blank "action list run" in timerFailCheck, is just from experimenting, trying to find the issue. Forgot to change it back when taking the screenshot. You can ignore that, as it runs "song_1_FAIL" 
  • edited October 2018
    If the various "Song_" ActionLists are all variants of one another, you should be relying on ActionList parameters to condense them wherever possible.

    Since a lot of what's shown here is noise (so far as the issue goes), I think what's actually key is probably quite small once the rest is stripped away.  I appreciate you trying to condense the ActionList descriptions through words, but I think it's going to have to be put into practice before we can actually get to the bottom of this.

    In a backup/duplicate project, strip away all non-essentials so that just the core issue occurs.  No animation, sound, or references to anything above song_1.  I think only then will we be able to debug it properly.
  • Parameters wouldn't really work for the song actions, just because they all have various lengths (different number of notes to hit).

    The simplified timerSet (engine wait x sec, then run timerFailCheck) I did have set up in scene. But I didn't try totally stripping down the other actions until now. Once I had the bare bones running, the issue seems to be gone. It's tough to pin point what would have caused the issue.

    I went back into my base project, and removed the "guitar" menu turning off while winning or failing, and this seems to fix the issue. However, when I go into the duplicate project (the one that's stripped down) and add in the menu turning off back in, the issue is still gone. So I'm assuming it's some combination of the menu turning off/on and the actions that are running. Which is strange since what I cut out was mostly just animations and sounds going off. And the fact that the same thing is happening when you win/fail versus the timer running out, in which case it works fine regardless.

    So for now, I'm just going to leave the menu on, as that somehow fixes the issue. It sure is a weird one! I appreciate your help!
  • I spoke too soon :(  the issue still persists if you play an incorrect note and then the timer runs out. I'm going to keep prodding to see if I can get to the root of the it.
  • Idk, I can't seem to wrap my head around why my actionLists aren't doing what they're told. A song action will be running but will act differently from what it is set up to do, but only after the timer runs out. I've stripped the actions down to the bare minimum and the issue is still happening. 

    song_1:
    image

    song_1_FAIL:
    image

    song_1_WIN:
    image

    symbol_timerSet: 
    image

    *not using "timerFailCheck" in this case 
  • An example of one of the problems that occurs, in case I haven't explained clearly:

    "song_1" starts, press a wrong note, "song_1_FAIL" runs, then "song_0" starts: can win or fail "song_0" normally

    "song_1" starts, let timer run out, "song_1_FAIL" runs, then "song_0" starts: press correct note, "song_1_FAIL" runs (sometimes, you can play a couple correct notes before the incorrect fail action runs)

    And keep in mind this isn't tied to any specific song, this pattern can happen from "song_2" to "song_1", from "song_3" to "song_2", etc. 
  • Again, Action Comments will help debug this.

    Going with your above example, write comments for each instance of ActionList: Run that calls song_1_FAIL.  Comments can be enabled via the cog icon.  If you make each comment unique, you'll be able to see exactly which Action is triggering song_1_FAIL incorrectly after pressing the correct note.

  • Ah I missed that about the comments. That feature is very helpful!

    So what the comments are telling me is that "song_1_FAIL" is being triggered by "song_1" BUT "song_1" is not running, "song_0" is running when this happens. I even put a comment at the start of both song actions, to see if it was getting briefly turned on by something but it is not. (I'm still using the AC Status Box as well.)

    What it seems like is happening is that it's acting as though both "song_0" and "song_1" are running at the same time, even though they are not. 
  • I think the time's come for me to see it for myself.

    Duplicate the project and remove all scenes but this one, as well as all graphics/sounds/animation etc to bring the filesize down.  Re-wire the OnStart logic so that Song_1 runs when the scene begins, so that I can experience the issue just by doing nothing and letting the timer run out.  PM me the project file, and I'll see what I can do.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.