• Thanks!
    And is there a setting combination to achieve this:
    "Select combatant from the pool of combatants who are engaged in battle" ?
    Because for example sometimes I have situation where the combatant A is in the scene at design time, and I'm hiding it during battle and battle spawns a second copy of it.

    And I want to make sure I grab the Battle copy of it.
  • Adding an In Battle status requirement to the Select Combatant node should do the trick :)
    Make sure to use needed All if multiple requirements must be valid.
    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!
  • Hey,
    So I'm using ORK.BattleSystem.turnBased.GetTurnOrder(true, -1, true); to get turn order of combatants for custom UI. This works great.

    But, when I add combatants mid-battle using battle event and Join Battle node, this code does not seem to return new combatants. I have 1 second delay in battle event, between Join Battle and when I'm calling ORK.BattleSystem.turnBased.GetTurnOrder(true, -1, true);

    Is there something else I need to do to update turn order? Or do I need to call different function to get to combatants added mid-combat?
  • A newly joined combatant will only be part of the turn order in the next turn. Also, you can register to the ORK.BattleSystem.turnBased.UpdateHUD event handler to get notified whenever the turn order changed :)
    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 February 2020
    Thank you I'll try ending turn when I add new ones.

    #1) What is the best/optimal way to temporarily give a command(Player Control) of combatants on the battlefield to the player? I'm doing this in a battle event.

    They need to be made Active Group members right? Or any other requirement?

    #2) I've overriden battle object with custom battle event, and I have not connected Player Grid Placement but used Place on Grid to place player. For some reason the Combatant placement is still displayed. Is there some global setting for this?
    image

    #3)
    Is there a way to add combatant from Battle Event mid-battle, but use Gameobject Combatant instead of spawning new one?
    Post edited by hellwalker on
  • 1) Yeah, the combatant will have to join the player group - don't forget that the player group has a battle group size limit, so you might also need to increase that (which you can also do via the event system).
    Also, AI Controlled needs to be disabled in the combatant's settings. Non-player group combatants are always AI controlled, so this setting is only for player combatants :)

    2) That's strange ... make sure you're really using the correct battle start event.

    3) Hm, no - unless you're using the Auto Join Settings and have the combatant's game object be within the auto join range.
    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 is the correct way to access Selected Data from script?
  • Depends on which source - with ORK 2.28.0 it's basically available like game variables, i.e. global selected data can be accessed like this:
    ORK.Game.SelectedData

    Object selected data can be accessed via the Object Variables component.

    Local selected data in events/formulas/battle AI is only available during the running thing ...
    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 2020
    Hey!
    Do I need to call anything else to disable Camera Control from custom script?
    ORK.Control.SetBlockCamera(1000, true);

    It works for player control, but not for camera.
    Post edited by hellwalker on
  • No, but your camera control has to be registered with ORK to be disabled. If ORK's camera blocks work, that should work as well (uses the same functionality).

    Using 1 is enough tough - if you use 1000, you also need to use -1000 to unblock it.
    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!
  • Hm, thank you I'll investigate it on my side of it.

    I think I might have asked this before but I could not remember where.
    Is there a way to force Combatant to Use ability while ignoring all requirements? For example if ability is set to only be usable in battle, but in the special case to have character use it outside battle with event?
  • Hm, I'm not 100% sure, but I think the Use Battle Action node could potentially do that.
    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 2020
    Hmm that didn't work for me when I tested and ability was battle only.
    Is it possible to do this via code? I only see one Use function on Ability Shortcut.
    Post edited by hellwalker on
  • No, that'll also check if it can be used at that time.

    I'll look into it.
    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 2020
    Thanks! I think that option will be useful for many. As there are often cinematics in RPG's where wizards cast a spell, or someone backstabs someone with in-game abilities.
    Post edited by hellwalker on
Sign In or Register to comment.