Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • 1 18996468-Dulst-Community-TEST
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kaoru Aoi
  • 18996468-Dulst-Community-TEST
  • Wiki
  • javascript

Last edited by Administrator Apr 10, 2020
Page history
This is an old version of this page. You can view the most recent version or browse the history.

javascript

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.

Getting started with JavaScript

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.

Examples of custom javascript commands on the server:

console.log(thisCard)
thisCard.variable = {
  "foo": "bar"
}
console.log(parseVariable('$variable'))
console.log(dotSyntax('$variable.variable2'))

Included third party libraries

Server side libraries:

  • Async
  • Lodash

Client side Libraries:

  • Async
  • Lodash
  • jQuery
  • three.js
  • hammer.js

Server side API

Local Variables

Global Variables

Helper Functions

effectAfterAction()

assignTargetVariable(target)

target parameter

Clone repository
  • AI Config
  • Achievements
  • Advanced Effect Building
  • Animal Kingdom
  • Animated Cards
  • Card Rarity
  • Copying Cards and Effects
  • Custom Action
  • Custom Actions
  • Dedicated Servers
  • Editing Cards
  • Effect Building
    • Basic Effect Building
    • Effect Triggers
  • Game Development Service
  • Game Making
    • Beginning Game Customization
View All Pages