like the title says how would i go about using an ability from script. i.e. if i write my own ai and want them to attack using an ability i have set up with in ork to make use of your damage dealers. or if i do something like add the base attack on the damage dealer and always keep it on so when the damage dealer hits the target i can deactivate it for a a second the reactivate it again ? not sure if this method will work either so figured id ask.
Once you've got the AbilityShortcut of the ability, (e.g. through functions in the combatant's ability handler, combatant.Abilities), you can use this function to start the ability:
id is the index/ID of the ability. user is the user combatant, targets is a list of target combatants, useAction being true means that it will use an action and animate everything, otherwise it'll just use the calculation.
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!
User is needed, targets can also be an empty list. This works also for base attacks, but you need to get the base attack ability from the combatant (there's a different function for 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!
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!
Basically, yes - but you need to remove the class/parameter types (int, Combatant, etc.).
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!
decided to use a custom separate damage system for the ai just to make things simpler and more streamlined since im writing the ai out in c#. just have to get the attack 100% of the time instead of 40% of the time atm. Thanks though, sorry i didnt update this earlier !
AbilityShortcut ability = combatant.Abilities.Get(int id);
ability.Use(Combatant user, List<Combatant> targets, bool useAction);
id is the index/ID of the ability.
user is the user combatant, targets is a list of target combatants, useAction being true means that it will use an action and animate everything, otherwise it'll just use the calculation.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
like this?
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames