Skip to content
Jasdac edited this page Dec 17, 2024 · 8 revisions

Welcome to the ObstacleScript wiki!

Getting started

  1. Install the library.
  2. Core Concepts.
  3. Making a level.
  4. Creating a generic custom asset.

Cheat sheet chat commands for level development:

Command Arguments Description
SAVE (str)group="" Saves spawned assets to the level DB. You can specify a group if you want to spawn a set of specific meshes by label. Otherwise ignore the group to spawn them when the level starts
TRUNCATE ALL n/a Purges the entire DB, removing all spawns from your level. Make sure to take a backup before doing this.
CLOSE n/a Despawns any spawned assets
LIST n/a Outputs a list of the spawn table, with indexes for each spawn. Important: When you delete an asset from the list, the indexes will change. Always list the assets before deleting or modifying one.
DELETE (int)idx0 (int)idx1... Deletes items by index. You can also use a range, ex: "DELETE 1-3" will delete assets 1,2,3
SETGROUP (int)idx, (str)group Changes the spawn group for an item by index.
SETDESC (int)idx, (str)desc Changes the saved description for an item by index.
LOAD (str)group="" Spawns an asset group as dummies.
LIVE (str)group="" Same as above, but spawns as live.
SPAWN (int)idx1, (int)idx2... Spawn one or multiple assets by index as live.
TEST (int)idx1, (int)idx2... Spawn one or multiple assets by index as dummies.
A2R (vec)degrees Takes a vector of degrees and ownersays a rotation. Ex A2R <0,0,90> -> <0.00000, 0.00000, 0.70711, 0.70711>
VEC (str)formula Adds or subtracts multiple vectors and ownersays the result. Ex: "<1,0,0>+<-1,0,0>" -> "<0,0,0>"

Saving descriptions

You can save descriptions on assets by adding a $ as the first character of the description when loading. This description will be put back on the asset when it loads (excluding the $ if loaded live). Useful for giving multiple configurations to a single object type. For an example, the trigger uses the description for config: [(vec)scale, (str)id, (int)flags].