Triggernometry is a plugin for Advanced Combat Tracker, intended to extend its built-in trigger system with a variety of different actions and configuration options.
· Add switch function for string: switch(index, [charcode])${func:switch(2):north,west,south,east} = south${func:switch(2, 48): 1022033304444} = 333 (charcode of "0" is 48)
· Add roundir function: roundir(θ, n) or roundir(dx, dy, n)
Matches the given direction (in radian or as dx/dy offsets) to the direction in a circle divided into |n| segments, and returns the index of the direction.
The sign of n indicates 2 division modes: north is the segment point or the border of 2 segments.
roundir(-1.57,4) = 1roundir(8,-6,-4) = 3
· Considering that Triggernometry could not parse function parameters with a minus sign after a space like function(1, -1) correctly, the spaces before function parameters in autofill are deleted, like roundir(θ,n).
· Add
switch
function for string:switch(index, [charcode])
${func:switch(2):north,west,south,east} = south
${func:switch(2, 48): 1022033304444} = 333
(charcode of "0" is 48)· Add![image](https://github.com/paissaheavyindustries/Triggernometry/assets/85232361/b7ab1f13-c5ba-4609-b588-b066d5d9d4e1)
roundir
function:roundir(θ, n)
orroundir(dx, dy, n)
Matches the given direction (in radian or asdx
/dy
offsets) to the direction in a circle divided into|n|
segments, and returns the index of the direction. The sign ofn
indicates 2 division modes: north is the segment point or the border of 2 segments.roundir(-1.57,4) = 1
roundir(8,-6,-4) = 3
· Considering that Triggernometry could not parse function parameters with a minus sign after a space like
function(1, -1)
correctly, the spaces before function parameters in autofill are deleted, likeroundir(θ,n)
.