Hi! I’m using an ActionTask to get iterate through a list and get the first available index and set a BBParameter int to that value. Only problem is, when I use that int on the next node, its value is -1. I debugged the method and it showed, right before the EndAction (true) that the value was correct, but still the next node received -1. I found it weird since I do basically that just before that node, but with a ConditionTask and thought I’d try it. It actually sets the value correctly but I have no idea why.
If you could shed a light on the issue, I’d be very thankful, since I don’t want that to happen to future nodes and such.
Are these some custom tasks you’ve created? If so, can you please share the code as well as a screenshot of the graph?
It’s hard for me to tell what could be wrong without a bit more info 🙂
I’ve imported your scripts and tried recreating what you show me in the screenshot considering I understood how to set everything up based on the code (but maybe I am wrong).
I honestly can’t see any problems/bugs. The “Check Any Slot Dead” is working correctly and is setting a “Dead Slot” blackboard variable to the index of the first null object in the list. Then that “Dead Slot” blackboard variable remains correct for any further actions down the tree until it changes. Hmm. Are you certain you’ve hooked up everything correctly and that your tasks do what you want them to do? 🙂
Do you actually use a blackboard variable of type Integer for setting the “Dead Slot” value, or is it some other type by any chance?
Sorry, I think I made it very confusing on my last post.
“Check Any Slot Dead” was working correctly and it did something similar to what “Get First Slot Alive” does, which is the node that wasn’t working.
So I remade “Get First Slot Alive” as a ConditionTask (much like “Check Any Slot Dead”) in the form of “Blasd” and that, for some reason, seemed to work.
And I’m using DynamicVars on both “Check Any Slot Dead” and “Get First Slot Alive”.
It’s honestly really hard for me to understand what could or could not be going wrong here. :/
It would greatly help though if you can please send me a mini reproduction project already set-up the way you have it, and tell me what is the expected behaviour in that sent project. This way I would be able to tell exactly what could be wrong and whether or not there is actually a bug and thus be able to help you.
Would that be possible please? If so please do send to (support_AT_paradoxnotion.com).