• edited March 2019
    74) another issue I have is in the Inventory Exchange, I setup both of them and everything works fine, using also tabs and an All tab, exactly the way I have setup my inventory, so I have my inventory and the "warehouse" box, when I roam in tabs (with warehouse almost empty) some types randomly stop responding and I have to do something random like move a weapon or start pressing the warehouses tabs to start working, then another random tab stops working. Anyway I made a short video so you can see the settings and the bug to understand it better. Btw when I'm in players inventory menu screen it never happens, I use same gui box settings for it too.

    https://vimeo.com/user31048128/review/321052182/3836f290b7

    at start I have the settings of the Inventory Exchange Menu screen and the GUI Box settings, after 00:44 you can see that At start everything works fine, then A (all) stops, the after moving something it works again and then the weapon tab stops responding. This is random it happens with random tabs.

    75) I don't remember if I asked this before, but is there a way that I can run an event when loading a game?
    Post edited by dlevel on
  • 70) Will be fixed in the next update.

    74) The video isn't working :)

    75) You can do that by using a Scene type global event, using the Load Game scene change type.
    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 March 2019


    here u go

    btw there is nothing blocking any buttons, and this is the exact same invntory box/setup like my inventory which doesn't have any issues when running on its own
    Post edited by dlevel on
  • Hm, yeah ... could I get a Unity test project? :D
    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!
  • haha thought so, will create one and send you :)
  • edited March 2019
    76) I need to run a script when a player picks up a specific item, is it possible via scripting?

    77) In custom menus, if I have keep open disabled (so the Main Menu dissapears) how can I call it via script again when my custom menu closes?

    78) Which is the lowest chance in loot tables for an item that I can have? (0.000000001)?
    Post edited by dlevel on
  • 76) Item collectors can use game events before and after collection - i.e. if you have to do something special (e.g. call a script), do it there.
    Or, if this is about when the player picks up a specific item from whatever source (e.g. battle loot or an event), you can register to the player inventory's ContentChanged handler to get notified when an item is added. You need a function like this:

    public void InventoryChanged(Inventory inventory, ItemDropType type, int id, int level, int quantity)

    And to register to the handler (assuming it's the player's inventory):

    ORK.Game.ActiveGroup.Leader.Inventory.ContentChanged += InventoryChanged;

    77) You can call a menu screen like this:

    ORK.MenuScreens.Get(screenID).Show(null);
    screenID is the ID/index of the menu screen.
    If you want to get notified when the menu is closed, you can replace null with an instance of something that implements IEventStarter.

    78) I'm not entirely sure - generally, it's a float number, i.e. the lowest float number bigger than 0 you can enter :D
    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 March 2019
    77) Ork.MainMenu.Show did the trick :)

    76) Can't get this to work, can you explain it a bit more? Do I create a new method (public void InventoryChanged(Inventory inventory, ItemDropType type, int id, int level, int quantity)? and where do I register the handler? Sorry but I need a bit more guidance here and if you have a minute a simple example ? :)

    79) Is there any way to override a specifics Item/Weapon Icon via a script? I m successfully getting an image via the internet and saving it in a prefab with an image component and want to show this Icon inside inventories etc.


    Post edited by dlevel on
  • 76) Ultimately depends on your use case - e.g. if the script is a component attached to something, you can simply add the function to it and do the registering in the Start function of the component. You'd also need to unregister the function when the component is destroyed, e.g. in the OnDestroy function (unregistering is done by using -= instead of +=).

    79) You'd have to replace the icon in the loaded settings in ORK (which you can do), but this'd have to be done each time the game is started, otherwise the setting will revert back to what was originally saved in ORK's data.

    E.g. for an item:
    ORK.Items.Get(itemID).languageInfo[languageID].icon = newIcon;
    itemID is the ID/index of the item, languageID is the ID/index of the language (or just go through the whole languageInfo array and change it in every language).
    Works the same for weapons and armors, just using ORK.Weapons and ORK.Armors to access them.
    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 March 2019
    Just saw the "weekly" (:P) patreon update, Save/Load to share items between saves!! THANK YOU :D

    76) Yeap it worked fine exactly how I wanted it, thanks

    80) I set my tooltip hud to also have a tooltip for item types(checked item types in the hud options), but in my tabs in inventory doesn't appear a tooltip with the description (%d). The tooltip works fine in items/weapons/armors etc.

    81) I'm using Check Field to check some fields if they return correctly and it was fine, what I haven't able to achieve is to search a list of fields from a List and if 1 returns true the node to succeed, any way to do that via script or can you add a new node for this? Thanks :)

    edit: Well I made a script to check a specific item in the list and then check that field from the Check Field node so I'm fine :) a node to search a whole list would be handy though.

    82) That might be an easy one but I need to be sure. I have an event that I run some global events in it, how can I stop this event if one of the global events checks fail? e.g: EventMain runs, and call EventGlobal, which has a check with succeed and fail outcomes: on succeed I want the EventMain to continue, on fail I want the EventMain to stop.
    Post edited by dlevel on
  • 80) Did you enable Enable Tooltip in the item type settings of your inventory menu screen?

    81) The Check Fields node can check if either all or just one of the field checks succeeds - see the Needed setting for that :)

    82) You need to set a variable in the global event to mark it as failed (e.g. in the local variables, they can be shared between the events if you enable Share Variables in the Call Global Event node). After the global event, check for the variable and don't continue in case it has the fail condition.
    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!
  • 80) Damn, some times I m embarrassed :D

    81) I think I tried it, but I'll try again.

    82) yeap that is what I thought.

    thanks :)
  • 83) Is there a way to get a Selected Data's variable? I have set a variable in a weapon (in inventory tab>Weapons>Add Variable) and want to get that value in another event
  • 83) Yes, by using the Selected Data variable origin - naturally you'll have to first get the weapon into selected data, e.g. using a Select Equipment node (in case the weapon is equipped by a combatant) or a Select Item node (to get it from an inventory).
    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 March 2019
    Is there somewhere I can have a script (component) that I can call methods? when I h selected an item with "Selected Data Choice" it's not equipped so no Equip prefab that I can have the components in it and run scripts etc.

    Could I hack my way to this by using Portrait Prefabs somehow? I would also want to run some scripts when buying this item from a grocery store so I can register for example ORK.Game.ActiveGroup.Leader.Inventory.ContentChanged += InventoryChanged; as we said in my previous questions, or getting some values from a script of the item.

    Post edited by dlevel on
Sign In or Register to comment.