- Made Table optional- Added UnitRecycler as an optional requirement- Upon calling PreloadUnit(), if the unit is not a hero and UnitRecycler is found, the unit will be added to the unit stock instead. Otherwise, it goes with normal preloading.- dummy unit's movement is disabled to prevent possible game crash.- You can now preload at any time during the game instead of only during the map initialization- Significantly optimized the code- Removed the unnecessary custom function for checking preload duplicates- Added Table to the library requirements- Preloading does not anymore happen in a single phase at the GUI Map Initialization- Resources are now preloaded at the instant you call the preload function- Other changes

- Added some optional library requirements including TimerUtils, GroupUtils, PlayerUtils- Simplified some script sections- Added the API for registering an illusion death event- Fixed a bug in the previous version where illusions' death effect visibility are not properly managed- Updated the demo spell- Added a new API GetIllusionElapsedTime() for getting the elapsed time of an illusion- Shortened the function AdjustTimedLife- Removed some unnecessary extra return values when in debug mode in the public functions- Some other code restructuring and some other fixes

This snippet is a replacement to the BJ function GetRandomSubGroup with the advantage of being able to directly enumerate random number of units in a group instead of creating another subgroup of an already existing group. Notice that this is not the same as GroupEnumUnitsInRangeCounted in which case the enumerated units are not random but is based on which units are picked first.

Useful system especially in making an MUI spell which uses timers. Instead of saving the spell data in a hashtable with the handleid of the timer as the parent key, you can just use normal arrays with the timerid as the index. This also allows you to pass custom data (integer) to timers.

System Features:

Indexed timers (Array safe, 1-8190 but can also be customized to be 8190+) NEW

Timer custom data (integer) attachment [NEW]

Timer double free protection

Automatic timer replacement (Useful safety feature which automatically replaces timers belonging to this system with a timer of the same timerid and handleid when destroyed)

v1.2- Added more functionalities such as attaching custom timer data, now the system comprises all but is not limited to the main functionalities of Vexorian's TimerUtils- Optimized the code especially in the part in updating the timer stack- Fixed some bugs

v1.1- Added the possibility for users to configure the timer stock size above 8190- Some fixes

This system allows you to register a code that will run every specified timeout. Note that this system only uses one timer for all registered codes. Therefore, codes with periods indivisible by 0.03125 doesn't run with a constant time interval. Although the difference will not exceed 0.03125, you probably don't want it to be that way. But this will not be much of a problem for codes with low frequency period such as those with timeouts greater than 2 seconds since the difference wouldn't be so noticeable.

In short, this works best for codes with timeout divisible by 0.03125 seconds.

v1.3- Fixed a minor error concerning the index of a registered code in the RunLoop not being decremented by 1 when a code is removed from the loop.

v1.2- Replaced TriggerEvaluate() with .evaluate() through the use of function interface- Added an option to the configuration whether or not the system will automatically adjust the code timeout in case the entered timeout is lesser than the minimum supported timeout- Removed the requirement Table. Instead, uses arrays which were made possible through using interface functions as the index.

v1.1- Fixed the bug regarding the incorrect unregistering and re-registering codes to the loop- Uses a TableArray instead of two separate tables

Related Topics or Resources

This system provides users with helpful utilities with regards to creation of illusions as well as the manipulation of many of their aspects.With this system, you can now create illusions of any type as easily as creating units. This even allows you to create permanent illusions.Read the script header for more details.

Please give credits to the following people if you use this resource in your map.