A method library for Overwatch Script To Workshop by Deltin to shorten code and generally make things easier. Post any suggestions, enhancements, or bugs in the issues tab.
SumOfArray(arrayToSum)
AverageOfArray(arrayToAverage)
TallnessOfHero(hero)
: Same as tallness of player, but instead gets the value for a hero.NearestSolidSurface(point, accuracy)
: Imperfect way of getting position of nearest solid surface. Accuracy is amount of times looped.GenerateForeachArray(length)
: Generates an array of a length where each value is equal to its index. Great for using for Filtered and Sorted arrays.
Dictionary
: Easy access and editing of Dictionaries with keys associated to valuesTrigger
: Activate and deactivate Triggers to sequentialize your rules.SphericalBarrier
: Create spherical barriers and keep players in and out of them in a number of ways.CylindricalBarrier
: Same asSphericalBarrier
except it extends from Y -∞ to ∞.CuboidBarrier
: Create a barrier from 2 opposite points in the shape of a rectangular prism, cube, etc. Has the same functionality as a normalBarrier
.
Installation instructions can be found here for OSTW.
Download the method library from the releases page and copy it to the same folder as your OSTW project file.
At the top of your project file add import "library.ostw";
.
Once installed you can use the methods like you would any other action. NOTE: No methods in this library can be used within the conditions tab. However you can work around this by using AbortIf(Not(condition)) at the beginning of the actions for each condition that uses a method (this has some limitations).