Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Variables

JXSnack edited this page Mar 12, 2023 · 4 revisions

Creating variables

Creating variables is pretty easy. In your script.json you can see global_variables. In global_variables you can add something like "foo": 5. In our case the variable name is "foo" and the value is 5. Ofcourse you can also do a string like this "foo": "Hi, I'm a string!".

Example

"global_variables": {
	"foo": 5,
	"faa": "I'm a string!"
},

Reading variables

Reading variables is actually easier than u think!
If you want to see your variable in your game, you can (we will use "foo" as variable example) just do {@foo} (this works everywhere in the editor!).

You want to add and subtract from your variables? Check out functions and doable

CrystalStudio

  • Settings
    • Custom theme (coming soon)
  • Project
    • Creating project (coming soon)
    • Open project (coming soon)
    • Bookmark project (coming soon)
  • Editor
    • Buttons (coming soon)
    • Scenes (coming soon)
    • Texts (coming soon)
    • Build/play Game (coming soon)

CrystalScript

Clone this wiki locally