Reply To: Storing actions to be used later and BB variables

NodeCanvas Forums Support Storing actions to be used later and BB variables Reply To: Storing actions to be used later and BB variables

#16125
mmalone
Participant

I know what references are and I know C# very well.  That being said, looking over my previous questions I can see how you would think otherwise.

Let’s try this.  What I’m trying to do may boil down to:  Is it possible to assign the VALUE of a BB variable to either another BB variable (so a copy) or non-BB variable (node has a C# variable declaration – “public float myfloat;”)?

Ignoring my original question (the way I asked it).  How can I do the following:

  • A combatant plans out what it wants to do on the beginning of its turn and stores the resulting “action” (like shoot laser pistol at target).  There could be multiple actions (a “list” perhaps).  I’m not specifying how the action is stored (it’s part of my question).
  • Later, that same combatant goes through all the actions, one at a time, and runs them.

How can I do this in the “NodeCanvas” way?

Here are a couple thoughts I had:

  • There may not even be a “list”, perhaps a different path down the BT to run the action (trying not have duplication in the tree).  I suspect a subgraph would be involved.
  • Store the data required to run the action.  a script would access the BB to get the values.
  • Use an enum for each action type (if the number of types isn’t too large).  would still need to store data.