Forum rules - please read before posting.

"Increase by Value" in action list running multiple times

edited May 2023 in Technical Q&A

Hi all,

Hope you are doing well!

I noticed that when I press "S" repeatedly, which is the key I mapped my "endCutscene" shortcut to, the "increase by value" action runs multiple times.

As an example, I have a variable called "A" that I am increasing by a value of 1. If the previous value was 0, it becomes 2 (wrong) if I press "S" repeatedly, but when running the cutscene normally, it becomes 1 (correct).

Is there any way I could fix this?

Thank you!

Comments

  • The correction of variable values upon skipping should be automatic.

    What are your AC and Unity versions, what input system are you using, and is the ActionList involved being run directly or via another ActionList?

    Any details/screenshots you can share to help recreate the issue would be welcome, as I cannot recreate this behaviour.

  • edited June 2023

    Hi Chris,

    Thank you so much for getting back to me! I missed this notification on my end, sorry for the delayed response.

    I can link videos of what is happening for this case. "niceAllTheWay" is the variable of focus:

    Without skipping (correct): https://drive.google.com/file/d/1yt4yCen_sfV4jwOSosRrD5piTAXbRspi/view?usp=sharing

    With skipping (wrong): https://drive.google.com/file/d/1kuYVtPXYmPsbHrAUZ5bFy9HRD8l42vFs/view?usp=sharing

    Action list where error occurs: https://drive.google.com/file/d/1RHPSudqEmy7uu9nifNVrmZG7kbXOVZ1K/view?usp=sharing

    Also, I noticed another strange thing that has been happening -- when I press "S" for one of my interactions (splashing paint on a mannequin), it causes my player to become invisible in Game View. In scene view, though, it seems like the player is still there strangely.

    This does not happen if I do not press "S", however -- it works as expected.

    I am unsure where I could be going wrong for this, but I am attaching a video as well for this too just in case (the without and with are in the same video. Without is first, with is second): https://drive.google.com/file/d/1_Hr2bD3b_c9q-EQdMZwjoNXbiHUG4ytB/view?usp=sharing

    Any help or guidance is appreciated, thank you!

  • It looks like you're skipping dialogue options that each end with a Conversation.

    As a test, run a Cutscene that runs one of these options directly with the ActionList: Run Action - without involving a Conversation at all. Does the variable increase correctly when skipped?

    In a backup/duplicate project, try also the latest release.

    it causes my player to become invisible in Game View. In scene view, though, it seems like the player is still there strangely.

    View the Player's Inspector (both their root and their sprite child), and compare them when run normally vs skipped. Check in particular the position and Sort Order values - is there any noticable difference?

  • Sounds good, I'll try that out!

    Regarding the second portion -- it doesn't seem like there is a difference. I'm unsure what you meant by the root and sprite child, since I am using a skeleton, but it seems that the order of the skeleton when skipping vs. not skipping is the same, even after pressing 'S'.

    Is there anything else I can take a look at?

  • The position and Sort Order values are the main things to check - the latter being in the "Sprite Renderer" component, not the order of the skeleton objects in the Hierarchy.

    Something else to try is to keep the Scene and Game windows open at the same time - if both are open in the Editor at the same time, does it then show in the Game window?

  • Yes! So from the video I linked, it shows in the scene window but not in the game window (even when they are side-by-side). I double-checked, and it seems like it still is like this.

    Thanks for the heads up! Seems like they are in the order as expected. The position of the character game object does not change (as expected it seems).

  • @ChrisIceBox Also just following up -- would you be open to cloning my repo if I give you access, in case you wanted to try it out on your end as well?

    No worries if not! I was just wondering if it is possible to be reproduced, since it is a bit of a strange issue.

  • If you can provide a link to download the project along with recreation instructions, PM it to me and I'll take a look.

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.