1.Is the "key" to use the selected variable the same as the key of the selected data?

2.A lot of equipment is stored in a selected data Key,
If I change the Equip variable "damage", will all the equipment's variables change?
What about equipment that doesn't have that variable?
Only one change?
  • 1) If I understood that correctly, no.

    The selected key from selected data defines what's used to store the selected data, e.g. how an ability or item is available in their battle events via action selected key, or an item in it's init game event (also as action).

    The variable key is the key/name of a variable as it's always used. If you want to access the variables of something stored in selected data (e.g. the item of the init game event), you use the Selected variable origin with the selected key (e.g. action) to get the variables out of selected data, and the individual variable keys to access the variables within it.

    2) If multiple variable sources are stored in the same key (e.g. 3 swords and 1 helmet) the variable changes are used on all stored equipment. If they don't have the variable, the change will happen based on the default value (e.g. 0 for float variables), e.g. if you have a change of Add 1, it'd be 1 afterward.

    If you only want to only use certain equipment, you can use the filter options to filter based on equipment variables in the Select Equipment (for equipped) or Select Item (for inventory) nodes.
    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 January 3
    Thank you for answer. I understand!

    I have a question about the event step.

    select ID node and Store Selected Data Quantity Node

    1. Is the select ID node getting data based on the INDEX of the category (item, weapon, etc.)? What does ID mean?

    2. Does Store Selected Data Quantity Node store Count of stored data?
    Or is it storing the quantitiy of each data? If there are multiple data, can this decide which data quantity will be stored?

    3.I want to make the equipment of a specific id in my inventory as selectData.
    However, if there are multiple same items, I am curious how to obtain a specific item.
    Is the chance option of the "selectItem node" the probability that the item will be put into selectedData?
    If there are multiple same ID item in Inventory, do they all put into one key?

    4.Is there a way to know how many specific itemtypes are in the inventory?

    5.Is there a way to do bulk work?
    How to do the same job on 100 indexes at once..
    When I have to repeat the same operation on multiple indexes for new content late, do I have to do everything one by one?

    6.When I fire an event in a script, can I know when it ends?
    eventInteraction.StartEvent();After executing this, I want to execute the function (callback) at the end point, is it possible?

    7.I don't understand the meaning of "Set Variable Text Codes" in the "Change Selected Data Name" Step.
    Is it changing the text code to the variable of the selectedData?
    How to use it?
    Post edited by KESHYAS on
  • edited January 4
    1) Yes, the ID is the index of the data you're looking for (e.g. item ID/index).

    2) It'll store the combined quantity of everything that's in the defined selected key. E.g. if you have multiple items stored in it, their quantity will be added up.
    If you want the quantity of a specific item, store only that item into selected data.

    3) It'll use the first item with the matching ID that's found - but that can also be a stack of items, depending on your inventory setup.
    You can also use the Select Item (for inventory) and Select Equipment (for equipped) nodes and just select the weapon/armor you want to use instead of going via ID.

    4) I don't think that's possible via events.

    5) No, you can do a loop within the event with a counter variable (and also use that as ID in the Select ID node). This would work like this:
    - at the start of the event, use a Change Game Variables node to set a local float variable to the first ID you want to use
    - do your stuff after that node
    - at the end, use a Change Game Variables node to icnrease the ID variable by 1
    - use a Check Game Variables node to check if the ID variable exceeds the IDs you want to check, if not, loop back to the start (i.e. the node after setting the initial ID)

    6) No, not with event interactions, but you can start events via ORK.GameEventTicker, which has multiple StartEvent functions available that also take a callback function (without parameters).

    7) When enabled, this option will replace the variable text codes you used in the node with actual variable values they have at that time, i.e. the new name will not contain the text codes but the actual values. Which variables will be used is defined by the variable origin settings.
    Otherwise, the name will be set with text codes, which will be replaced by values whenever the name is shown somewhere (i.e. the values could be different each time).
    Post edited by gamingislove on
    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!
  • thank for answer

    5. The mentioned method seems to be a way to change while the game is running.
    I want to apply the value set at one index to multiple indexes in the editor.
    (Multi-change through multi-selection, like Unity's scriptable object)

    I have to reset the level up point to level 30 of one piece of equipment and apply it to 100 pieces of equipment. (Or i have to multi-select and assign multiple gameEvent assets)
    I can copy after setting one, but since many objects have already been created, I cannot copy after deleting.
    I think this part is the most uncomfortable...
    Is there any way to do multi-edit?

    6. In the parameter of GameEventTicker.StartEvent,
    Instead of pass on null in localvariables,selectedData,IEventStarter,
    how do I create and put in a new one?
    I know to pass eventObejct,StartingObject, but I am curious how to put values ​​instead of null in the above three parameters.
  • 5) I see - no, there's no multi-edit in the editor.
    You can write a custom script to change settings, though. Execute it while having the ORK editor open and save the changes in the editor afterwards.

    E.g. to set the level points of a weapon's level:
    ORK.Weapons.Get(index).level[level].lvlPoints = points;
    index is the ID/index of the weapon, level is the level - 1 (level 1 is level index 0, i.e. 30 would be 29), points is the new level points you want.

    6) IEventStarter is an interface you'd need to implement in your custom class to get notified on the end of the event and is mainly meant for components (e.g. the event interaction), getting notified via the delegate is easier in most cases.
    As for local variables or selected data, you'd only need to actually pass something on if you want to share or use certain things as the local variables/data - the running event will create them itself when needed otherwise. You can either take the variable/data handler from something (e.g. variables of an equipment) or create new handlers.
    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!
  • 5.Sorry for misunderstanding.
    I didn't know that I could execute a function/game event even in the editor.
    If I write the appropriate macro function, I think I can make the changes I want. Thank you for answer.

    6.understand. Thank you!
  • 5) Check out Unity's MenuItem attribute, you can use it to start static functions via Unity's menus to call your functionality in the editor. There are also examples in the documentation :)
    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.