... | @@ -4,13 +4,13 @@ By Tiers: |
... | @@ -4,13 +4,13 @@ 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.
|
|
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.
|
|
|
|
|
|
## Getting started with Javacript
|
|
# Getting started with JavaScript
|
|
|
|
|
|
The simplest way to try custom scripting is through the custom javascript action in the effect builder.
|
|
The simplest way to try custom scripting is through the custom javascript action in the effect builder.
|
|
|
|
|
|
To use it, use the custom javascript action. All javascript is executed in the context of that action. Custom javascript action can be executed either client side or server side. Server side execution effects the logic of the game while client-side execution effects the rendering and visuals on the client. Even if your game doesn't have a server the logic of the game is still server-side with a local server.
|
|
To use it, use the custom javascript action. All javascript is executed in the context of that action. Custom javascript action can be executed either client side or server side. Server side execution effects the logic of the game while client-side execution effects the rendering and visuals on the client. Even if your game doesn't have a server the logic of the game is still server-side with a local server.
|
|
|
|
|
|
Examples of custom javascript commands.
|
|
Examples of custom javascript commands on the server:
|
|
|
|
|
|
```
|
|
```
|
|
console.log(thisCard)
|
|
console.log(thisCard)
|
... | @@ -33,3 +33,13 @@ console.log(dotSyntax('$variable.variable2')) |
... | @@ -33,3 +33,13 @@ console.log(dotSyntax('$variable.variable2')) |
|
* jQuery
|
|
* jQuery
|
|
* three.js
|
|
* three.js
|
|
* hammer.js
|
|
* hammer.js
|
|
|
|
|
|
|
|
## Server side API
|
|
|
|
|
|
|
|
Local Variables
|
|
|
|
|
|
|
|
Global Variables
|
|
|
|
|
|
|
|
Helper Functions
|
|
|
|
|
|
|
|
effectAfterAction() |
|
|
|
\ No newline at end of file |