-
July 16th, 2024, 19:56 #1
- Join Date
- Feb 2021
- Posts
- 412
Is there a way to get the total number of targets on an attack roll?
Specifically I am looking in manager_action_attack.lua in my custom ruleset, the function is performRoll. I need to find the number of targets.
Thanks!
-
July 16th, 2024, 20:25 #2
- Join Date
- Feb 2021
- Posts
- 412
found it myself!
aTargets = {};
aTargets = TargetingManager.getFullTargets(rActor);
nTargetCount = 0;
for _,sTar in pairs(aTargets) do
nTargetCount = nTargetCount+1;
end
-
July 16th, 2024, 21:18 #3
As aTargets is a numerically indexed LUA table you can use #aTargets to get the number of records in the table.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks