edited June 26 in ORK Scripting
Is it possible to get the targets of an action through code?

Currently I subscribe an event to ORK's actions changed event and look through the active actions, but the target list for attack abilities is always null.

image

image

I want to set up an event where a bark plays when a combatant attacks another one.
Post edited by AustinGreear on
  • The target list contains targets of an action, if there are any. If they're out of range (and that was already checked), they can be in the outOfRange list.

    However, this depends on the action's target selection settings, e.g. if it's a None target action there could be no targets at all.
    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 about AbilityActions? They should have targets right? After I use a basic attack action the targets list is null. Is there some other way to get target info from an action as its used?
  • Especially for ability actions (and item actions) - those are the action types that have targets. There can't be a null added to the target list (technically yes, but this is never done, only real combatants are added), so maybe try just going through the target list of the action directly?

    Also, what I said above regarding the target selection settings of the ability or item is the main thing to consider, e.g. actions like in the action RPG tutorials that don't use target selection and just let you swing your sword will not have targets.
    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.