A simple minion manager, adding support for HP sorting and other stuff, for now it does what I needed for my prediction utility
Please note I had no lag with this, but no promises...
Credits to Inspiredfor helping with NetworkID and pointing out silly late night mistakes!
Simple to use:
EnemyMinions = GetMinions(1, 900, myHero)
You can use 1 for All, 2 For Enemy, 3 for Ally, 4 for Jungle and 5 currently for debug
The second parameter is Range, I used 900 for example but you can use any range
Finally Object to check from, I would advise myHero
To use the returned class you can do:
if EnemyMinions ~= nil then for _, object in pairs(EnemyMinions) do count = count + 1 end end
In this case I am simply counting the number of minions in the returned table. I recommend you always check for nil to avoid errors.
To add: Put this script in your Scripts/Common folder then include this in the top of your main script:
require('MinionManager')
Adding more support soon
Download:
https://raw.githubus...nionManager.lua
Working Gif: