|
|
Full scripting is only available to Enterprise plan developers.
|
|
|
Custom scripting gives experienced developers even more power by allowing you to run your own javascript.
|
|
|
|
|
|
By Tiers:
|
|
|
|
|
|
Free and Pro-tier developers only have access to in-play scripting. Enterprise customers can run javascript anywhere in their game, including sets, community pages, landing pages, etc.
|
|
|
|
|
|
Developers on the free plan have access to limited javascript that is executed **only** for the game's primary owner. It is useful for testing and debugging.
|
|
|
## Getting started with Javacript
|
|
|
|
|
|
The simplest way to try custom scripting is through the
|
|
|
|
|
|
|
|
|
To use it, use the custom javascript action. All javascript is evaled in the context of the the match and the action specifically.
|
|
|
|
|
|
|
|
|
To use it, use the custom javascript action. All javascript is runned in the context of the the match and the action specifically.
|
|
|
|
|
|
Examples of custom javascript commands.
|
|
|
|
|
|
|
|
|
|
|
|
console.log(thisCard)
|
|
|
console.log(thisCard.variable)
|
|
|
console.log(parseVariable('$variable'))
|
|
|
console.log(thisMatch.variable)
|
|
|
console.log(thisCard.effects)
|
|
|
|
|
|
## Included third party libraries
|
|
|
|
|
|
**Server side libraries:**
|
|
|
Async
|
|
|
Lodash
|
|
|
|
|
|
**Client side Libraries:**
|
|
|
Async
|
|
|
Lodash
|
|
|
jQuery
|
|
|
three.js
|
|
|
hammer.js
|
|
|
|
|
|
|
|
|
|
|
|
For client side scripting you have full access to the DOM as well as included libraries Lodash, jQuery, threejs.
|
|
|
|