Forum rules - please read before posting.
Tech questions during the weekend? Drop in on the community Discord channel!

Possible Bug in 1.70.1: Action List Parameters Not Being Altered

edited January 22 in Technical Q&A

It seems that Action List asset parameter values are not changing when trying to set it's value using the "copy from global variable" action. It's current value just appears to stay as it's default during gameplay.

Comments

  • Actually, it does work in a scene action, but not in an action list asset. That is, the current value visibly changes when using a set parameter action in the scene, but when running an action list asset it still displays the same default value.
    It must be changing under the hood though, because my inventory amount is changing as it should.

    Except for this: Inventory items do not remove (via the remove action) if they are set to carry multiple and carry on start. I made a trigger just to test it, and I got a stack overflow exception:

    The console message is so long that I cannot paste it here though.

  • edited January 23

    Thanks for the report, but I'll need proper, exact steps to recreate this, I'm not clear on how exactly you're setting and using the parameter's value.

    Is the issue type-dependent, and does it occur if you set it's value directly - i.e. "Entered Here"?

    What are the properties of the ActionList asset, and are you modifying parameters within the asset or from another?

    Please share as much detail as you can - screenshots of everything would be best, including any Console messages.

  • Oh man, sorry Chris, the stack overflow was just a stupid error by myself - somehow I was looping the remove item action back on itself :/

    So, back to the parameter thing. I have an action list asset that is run by an active input (it is the "reload" you may recall us discussing a while back), in which:
    *A global variable is set
    *The parameter of the action list is set to the same as this variable
    *An inventory item (ammo) is set to the same amount as the parameter

    The issue is, despite it actually working, the "Current Value" of the parameter (this is only displayed in play mode) does not display it's actual amount if it is altered through an action list asset - like this. However, if the same value of the same parameter is set through an in-scene action, the current value does update - though you have to re-select the parameter's action list in the project window to see it update.

    Additionally, I am having an issue with this inventory item not removing if the amount is zero (you can carry multiple, not in separate slots). Currently, I remove the item (ammo), then add it again by the amount of the parameter. Then I check if the variable of the ammo is zero, then I remove the item altogether, like in this image:

    https://imgur.com/559qTQH

    But the item does not remove for some reason.

  • I forgot to answer your question: The parameter issue occurs when using either as a directly set value or set as the same as a variable.

  • edited January 24

    Just to be really clear, then: the issue is just to do with the display in the Editor, and not the actual effect on game logic?

    the "Current Value" of the parameter (this is only displayed in play mode) does not display it's actual amount if it is altered through an action list asset

    Are you viewing the ActionList asset, or the runtime instance of the list in the Hierarchy window? v1.70 now separates these two - so changes made to a runtime instance of a list are not reflected back in the original asset source file, and that's by design.

    I am having an issue with this inventory item not removing if the amount is zero

    Is Action 17 in your screenshot actually being called? Re-route 16 to 18 to 17 so that the Console shows the Comment if so.

    The check shouldn't be necessary, though. If you remove the item in 14, then adding 0 instances of it in 27 shouldn't have any effect. That it does is a bug, and will be addressed as such, but you should instead check the parameter's value before adding this as an amount in the first place (i.e. 14 -> 16 -> 27).

  • Just to be really clear, then: the issue is just to do with the display in the Editor, and not the actual effect on game logic?

    That's right. At first I thought it wasn't doing anything, and that's because:

    Are you viewing the ActionList asset, or the runtime instance of the list in the Hierarchy window? v1.70 now separates these two - so changes made to a runtime instance of a list are not reflected back in the original asset source file, and that's by design.

    I was viewing the ActionList asset - I wasn't aware that a runtime instance was generated. I see that it actually does work now, but I have to quickly catch the action list before it is removed, which makes it a bit tricky to test.

    And finally, I think the removing inventory item is solved too, thanks for the advice. I restructured the action list a bit and now the item gets removed when the parameter is zero:

    https://imgur.com/0a3BKhc

  • Action 16 wouldn't be necessary - it's a duplicate of 14. Either way, this is a bug and I'll remedy in the next release.

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.
Do NOT follow this link or you will be banned from the site!