... | @@ -8,13 +8,15 @@ Free and Pro-tier developers only have access to in-play scripting. Enterprise c |
... | @@ -8,13 +8,15 @@ Free and Pro-tier developers only have access to in-play scripting. Enterprise c |
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
```
|
|
```
|
|
console.log(thisCard)
|
|
console.log(thisCard)
|
|
thisCard.variable = "foobar"
|
|
thisCard.variable = {
|
|
|
|
"foo": "bar"
|
|
|
|
}
|
|
console.log(parseVariable('$variable'))
|
|
console.log(parseVariable('$variable'))
|
|
console.log(dotSyntax('$variable.variable2'))
|
|
console.log(dotSyntax('$variable.variable2'))
|
|
```
|
|
```
|
... | | ... | |