Hello, guys!
I have a question about using Selected Data through custom script.
I saw the example where you use something like this:
List<Combatant> combatants = SelectedDataHelper.GetCombatants(dataHandler.Get("Combatants"));
But i don't get how to define dataHandler correctly. Should it be like this?:
SelectedDataHandler dataHandler = new SelectedDataHandler();
Seems it doesn't work for me and i need to get instance of dataHandler with data from Ork somehow but i don't see the option to make it. Any thoughts?
  • What's your use case where you want to use selected data?

    Generally, selected data is only 'alive' in a running event (or calculating formula).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited December 2019
    The idea what i have is about getting SelectedData during ork event and then calling function on my sctipt (also through the same event) where i read this SelectedData and do some stuff with it. Or atleast sending this data as a parametr when calling the function. But as i get both of this options are not available for now. You mentioned in another thread about custom node for ork events to do this kind of operations with SelectedData. Is it way to create custom nodes now?
    Post edited by johnnymilkysweet on
  • No, both options are currently not available out of the box.

    Writing a custom node is probably your best option. It's easiest if you copy one of the existing node's code and modify it to your needs - e.g. the selected data nodes can be found in Gameplay/Events/Nodes/SelectedDataNodes.cs in the source code project.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.