• Hi @gamingislove,

    Quick question on writing out an expanded custom UISelectionCursorComponent. What I would like to do is expand this component so that I can have multiple cursors that change based on if the given input is disabled or not.

    I have a rough idea on how to go about implementing it, but with regards to Editor behavior I'm running into issues around the automatic ORK serializing editor.

    When I add Game Object fields, it seems to serialize them correctly, but it doesn't let me actually put in any scene references:

    image

    image

    Am I just wrapping the GameObject wrong for the serialization? Been looking through the source and so far haven't found anything that stands out (this is for a Prefab).

    Thanks!
  • edited May 9
    As soon as I hit submit I stumble on "[EditorInfo(allowSceneObjects = true)]" tag which solves the issue. Nevermind!

    Although it looks like due to inheritance and the Settings class, I might need to do source changes anyways.
    Post edited by Acissathar on
  • You can also just write a custom implementation for the inspector of the component - ORK/Makinom source code has many of those to check out and copy from :)
    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!
  • What would be the proper way to generate a random shop inventory, with some static items and sometimes random new items to add?

    For example:

    1. Shop starts with Wood Sword.
    2. When player party hits level 3, Shop will now also sell Iron Sword.
    3. When player party hits level 5, Shop will now also sell Steel Sword, and then randomly will pick from Nothing, Iron Sword +1 or Iron Sword of Flames.
    4. When player party hits level 7, Shop will now also sell a Meteorite Sword.

    Ideally, I'd like option #3 to only be determined once per playthrough at that time.
  • There are different ways to go about it, e.g.:
    - the Availability Conditions of the individual things added to the shop
    - using Loot to get random items from a loot table
    - using schematics to change shop inventory (only works when saving shops and using a shop ID)
    - setting up different shops and using them based on player level (e.g. conditions on the Shop Interaction)
    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!
  • Perfect, I'll give those a go and I think the schematic route will work out great. Thank you!
  • Is there a way to get the Quantity of an item from an item collector? I'd like to have the player hit a mining node for each ore they will receive. I know we can get item from the local selected data, but not sure how to grab that quantity value from it as I'm not finding any nodes to check a value of an item.
  • The Select Item Collector node can get the item from an item collector and stores it into selected data. Afterwards you can use the Store Selected Data Quantity node to store the quantity of stuff stored in selected data into a variable.
    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!
  • @gamingislove Awesome, thank you. A follow up, with regards to Item Collector being set to Single and with multiple items defined, how does it determine random?

    Does it use the Chance % for a weighted random, or does it just do a basic 1-X pick with each item having the same chance?
  • It's a basic pick with each item having the same chance.
    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!
  • Sweet, appreciate it! The select worked as desired and I'll just do some formula stuff to get what I'm after for the collection part.
  • Hi GiL, is it possible to disable the Set Horizontal Speed and/or Use Position Change settings of a combatant at runtime? (Even in script is fine)

    What I'd like to do is stop it from forwarding the speed when teleporting. I can sort of work around it through Mecanim parameters, or just waiting until the speed eventually works it back to 0, but ideally I'd like to skip this extra wait time by just not toggling that from even being set in the first place.
  • edited October 24
    Use Position Change apparently isn't related at all (on/off doesn't make a difference) with my setup, so really just need to toggle the Mecanim auto params.

    This almost seems to get me what I want, but it doesn't appear to actually save the change to the combatant. Is this the right way to access it?

    (Working code)

    Combatant combatant = ORKComponentHelper.GetCombatant(list[i]);
    if (combatant != null)
    {
    List<AnimationSetting> animations = new List<AnimationSetting>();
    combatant.Setting.animations.GetAnimations(combatant, ref animations);
    foreach (var anim in animations)
    {
    anim.autoParameters.mSetAutoHorizontal = usePositionChange;
    }

    combatant.Animations.UpdateAnimations();
    }


    Edit: Thought combatant.Animations.UpdateAnimations(); afterwards might be the missing piece, but still no change unfortunately.

    Edit 2: Actually it is! If I hard set the above to false, it blocks as expected. The issue is I had my wait node in the wrong spot so I was enabling it again immediately as it did the teleport lol
    Post edited by Acissathar on
  • Keep in mind that the animation settings are not combatant specific, i.e. every combatant sharing it would have that change (even if it's just for a frame).
    Respawning instead of changing position would also get rid of this.
    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!
  • Oh interesting, at the moment it applying to everything would be okay since it’s when placing on the grid and teleporting the player party to a new “scene” (but not actually a new scene just hundreds of meters away lol).

    But I can see that maybe causing a hitch if there are a ton of combatants to update, so if that becomes an issue I’ll swap to just destroying and respawning the party instead.

    Appreciate the info :)
Sign In or Register to comment.