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!
6) If I want to get combatant ability use range from not current GridCell, get AbilityShortcut from combatant and get TargetSelectionSetting from AbilityShortcut and using this code. targetSelectionSetting.useRange.GetConditionalRange(user, abilityShortcut).GetCells(user, testCell, ref useRangeGridCells, null);
GridCellCheck is null. Is it OK? or are there any good ways?
6) That's correct. Passing null for the check is also ok and would only need something if you want to do a check on cells if they should be added.
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!
7) You'll basically have to restart the target selection. Try using this code: IShortcut shortcut = combatant.Battle.BattleMenu.TargetHighlight.Shortcut; combatant.Battle.BattleMenu.StopTargetSelection(); combatant.Battle.BattleMenu.StartTargetSelection(shortcut, false); First, get the current target selection's shortcut (i.e. the ability or item that's being used). Next, stop the target selection and start it again for the same shortcut.
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!
7) After changing global variable, var combatant = ORK.Battle.SelectingCombatant; using this code and then doing as you're told, but nothing happens. Am I missing something?
7) Hm, might need a short wait between stop and start target selection. This is untested stuff, though - so it might not work that way in any case.
If you use the built-in way to stop and restart target selection (i.e. canceling out and selecting the action again), does it work and update the highlight?
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!
7)Yes, stop TargetSelection and select ability again from UI and highlight updated.
Sry I noticed Im testing in not latest ORK.So I updated ORK and StopTargetSelection becomes to work and UI back to ability selection window.But StartTargetSelection looks not working.Select the ability again manually and highlight updated. Also adding short wait isn't solve the problem.
And I tested it, change shortcut. var combatant = ORK.Battle.SelectingCombatant; IShortcut shortcut = combatant.Battle.BattleMenu.GetCurrentlySelectedShortcut(); combatant.Battle.BattleMenu.StopTargetSelection(); combatant.Battle.BattleMenu.StartTargetSelection(shortcut, false);
It looks working as i expected only first update,hightliht updated immediately. But Global variables changes again and GetCurrentlySelectedShortcut returns null. And when use the ability After first update,finish ability and not back to BattleMenu.
IShortcut shortcut = combatant.Battle.BattleMenu.TargetHighlight.Shortcut; This will get you the shortcut that is currently used for target selection, so what's used for the highlight.
IShortcut shortcut = combatant.Battle.BattleMenu.GetCurrentlySelectedShortcut(); This only gets you a shortcut if the battle menu has an action or target selected, so that might not be the case.
Using the target highlight's shortcut should give you the correct one.
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!
I noticed, when target selection of ability, use this code var combatant = ORK.Battle.SelectingCombatant; IShortcut shortcut = combatant.Battle.BattleMenu.TargetHighlight.Shortcut;
If shortcut is null at that point, that means there's no active target highlight. So, either no action is selecting targets or no action is selected in the battle menu to show highlights for it (before target selection).
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!
That sounds strange - those highlights are usually caused by the TargetHighlight class, so it'd need to have a shortcut to be able to do that.
How is that initial ability selected to show the highlights? E.g. via custom code or with built-in ORK features (e.g. battle menu, control maps, shortcut HUDs, 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!
I have a similar problem with this. In my case, when Abilities - Ability Variables uses Variable Change Templates, just showing the ability not edit at all, always asked to save .My Ork is updated to latest version.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
get AbilityShortcut from combatant and get TargetSelectionSetting from AbilityShortcut and using this code.
targetSelectionSetting.useRange.GetConditionalRange(user, abilityShortcut).GetCells(user, testCell, ref useRangeGridCells, null);
GridCellCheck is null. Is it OK?
or are there any good ways?
Passing null for the check is also ok and would only need something if you want to do a check on cells if they should be added.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I tried this (change conditional affect range by global variable) and works but I have one problem.Highlight area is not refreshed until pointing other grid cell.Are there any way or API to update highlight area?
Try using this code:
IShortcut shortcut = combatant.Battle.BattleMenu.TargetHighlight.Shortcut;
combatant.Battle.BattleMenu.StopTargetSelection();
combatant.Battle.BattleMenu.StartTargetSelection(shortcut, false);
First, get the current target selection's shortcut (i.e. the ability or item that's being used). Next, stop the target selection and start it again for the same shortcut.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
var combatant = ORK.Battle.SelectingCombatant;
using this code and then doing as you're told, but nothing happens.
Am I missing something?
This is untested stuff, though - so it might not work that way in any case.
If you use the built-in way to stop and restart target selection (i.e. canceling out and selecting the action again), does it work and update the highlight?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sry I noticed Im testing in not latest ORK.So I updated ORK and StopTargetSelection becomes to work and UI back to ability selection window.But StartTargetSelection looks not working.Select the ability again manually and highlight updated.
Also adding short wait isn't solve the problem.
And I tested it, change shortcut.
var combatant = ORK.Battle.SelectingCombatant;
IShortcut shortcut = combatant.Battle.BattleMenu.GetCurrentlySelectedShortcut();
combatant.Battle.BattleMenu.StopTargetSelection();
combatant.Battle.BattleMenu.StartTargetSelection(shortcut, false);
It looks working as i expected only first update,hightliht updated immediately.
But Global variables changes again and GetCurrentlySelectedShortcut returns null.
And when use the ability After first update,finish ability and not back to BattleMenu.
IShortcut shortcut = combatant.Battle.BattleMenu.TargetHighlight.Shortcut;
This will get you the shortcut that is currently used for target selection, so what's used for the highlight.
IShortcut shortcut = combatant.Battle.BattleMenu.GetCurrentlySelectedShortcut();
This only gets you a shortcut if the battle menu has an action or target selected, so that might not be the case.
Using the target highlight's shortcut should give you the correct one.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
when target selection of ability, use this code
var combatant = ORK.Battle.SelectingCombatant;
IShortcut shortcut = combatant.Battle.BattleMenu.TargetHighlight.Shortcut;
and shortcut is null.
Am I missing something?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
How is that initial ability selected to show the highlights? E.g. via custom code or with built-in ORK features (e.g. battle menu, control maps, shortcut HUDs, etc.)?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!