How to get reference for the other flow script

FlowCanvas Forums Support How to get reference for the other flow script

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3424
    dryrel
    Participant

    Hi!

    I need to get access of the other flow script in the same scene, to override a variable inside.

    It is required for the Options menu. I’m going to override code of prefab UI.

    i.e.

    UI_MainMenu flow script has Array_Text (string) variable. Arrow buttons update the selected text according to this array.

    I also other flow script attached outside of the prefab button. This will get all the resolutions and add it to text array in the UI_MainMenu flow script.

    #3433
    Gavalakis
    Keymaster

    Hello,

    If you want to Get/Set a variable from the blackboard of another flowscript, you can use the “Get Other Of Type” or “Set Other Of Type” nodes (both can be found under “Variables/Blackboard/” category in the browser.

    Once you have the node in the flowscript, you then need to:

    1. Set its T type to the same as the variable you want to get/set (right click on the node and “Change Generic Type”).
    2. Assign the blackboard from where to get/set the variable (please note that you have to drag & drop the blackboard component directly rather than the gameobject).
    3. Set the name of the target variable you want to get/set.

    Please let me know if this works for you.

    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    #3445
    dryrel
    Participant

    Hello, If you want to Get/Set a variable from the blackboard of another flowscript, you can use the “Get Other Of Type” or “Set Other Of Type” nodes (both can be found under “Variables/Blackboard/” category in the browser. Once you have the node in the flowscript, you then need to:

    1. Set its T type to the same as the variable you want to get/set (right click on the node and “Change Generic Type”).
    2. Assign the blackboard from where to get/set the variable (please note that you have to drag & drop the blackboard component directly rather than the gameobject).
    3. Set the name of the target variable you want to get/set.

    Please let me know if this works for you. Thanks.

    Hi!

    Set Other Of Type didn’t work unfortunately. Please check the attached image.

    How could it not work?

    This is required for the resolution button, this array needs to be created dynamically in code and needs to set in this array

    Attachments:
    You must be logged in to view attached files.
    #3460
    stevel
    Participant

    Your ‘Variable = Value’ is not set to a blackboard, it is set to a GameObject of ‘Panel-Single Option-Resolution’.  When dragging in your GameObject that has the Blackboard to access on it, be sure to choose Blackboard, not the top selection.

    Attachments:
    You must be logged in to view attached files.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.