Reply To: ScriptableObject Variable

NodeCanvas Forums Custom Nodes & Tasks ScriptableObject Variable Reply To: ScriptableObject Variable

#14194
aronze
Participant

Thanks for share your code, @wanderfalke. Yes, my idea is exactly same.

For example, create New Float asset for character health value. This asset used in game logic, health gauge, health text.  See following image:

Example

This approach is very powerful. Variable asset easily can be use anywhere even out of scene. If you want more, see this link (Unity Documents).

Finally, I think about following scenario:

  1. Create FSMOwner, Blackboard to my character object.
  2. Create Blackboard variable and link VariableFloat.
  3. If detect collision, decrease VariableFloat.

In step 3, I want to use just NodeCanvas.Tasks.Actions.SetFloat. I don’t want to create new actions. BBParameter already have binding feature. So I think it can be.

Attachments:
  1. Example.png

  1. ScriptableObject-Variable.zip