taro icon indicating copy to clipboard operation
taro copied to clipboard

feat: new functions, triggers, and actions

Open 420kyle69 opened this issue 3 years ago • 7 comments

Add functions getStringObjectElement, setStringObjectElement, and removeStringObjectElement which can take key, a string parameter

420kyle69 avatar Dec 26 '21 20:12 420kyle69

Add a function, getUserId (this returns the account's unique identifier, not just the player's entity id)

420kyle69 avatar Dec 27 '21 08:12 420kyle69

Change insertStringArrayElement and updateStringArrayElement functions to let empty strings pass too

420kyle69 avatar Dec 29 '21 07:12 420kyle69

Add splitStringIntoArray function, takes parameters string and separator Usage:

split Hello World by (space) into json array

// Will return a string: ["Hello","World"]

420kyle69 avatar Dec 29 '21 20:12 420kyle69

Add getPositionInFrontOfPosition function, takes parameters position, distance, angle Usage:

get position (5) distance from {x: 0, y: 0} at (0) radians

// Will return a position: {x: 5, y: 0}

420kyle69 avatar Jan 30 '22 20:01 420kyle69

Add a function allUnitsOfUnitType, which can be used in for all units loops. Takes parameter unitType. Add a function allPlayersOfPlayerType, which can be used in for all players loops. Takes parameter playerType.

420kyle69 avatar Feb 11 '22 07:02 420kyle69

I was always bugged by the fact that (center of (entire map region)) returned a position 1 tile off from the actual map's center, and turns out the entire map function intentionally returns a region offset by 2 tiles? Not sure what the reason behind this is

420kyle69 avatar Apr 05 '22 05:04 420kyle69

Add 4 functions for incrementing player/entity attributes. Usage:

increase (attribute) of (player) by (value)
decrease (attribute) of (player) by (value)
increase (attribute) of (entity) by (value)
decrease (attribute) of (entity) by (value)

Also move 'comment' case to the top so it breaks out of the switch early when encountering a comment instead of testing the 200+ cases

420kyle69 avatar Apr 13 '22 04:04 420kyle69