Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Constellation/Creating a basic Constellation script

From MoonGlasses Wiki
Revision as of 23:44, 16 January 2025 by Frizi (talk | contribs) (1 revision imported)

This tutorial will teach you how to create a basic Constellation script that will control a door based on the position of a lever.

Placing a Constellation object in your level

It is very simple to add a constellation object to your level, as all you have to do is drag and drop the Constellation root template into your level.

In your Root Templates panel, right click on the Constellation filter to filter only for Constellation root templates.

Once you have filtered for only Constellation root templates, it is as simple as dragging and dropping the Root Template named Constellation into your level

Adding entities to perform actions on

Now that you have placed a Constellation object in your level, we now need to add some entities for Constellation to perform actions on. In this case we will be adding PUZ_GEN_CONST_Lever_Floor_Rich_A and DOOR_Double_Big_Dungeon_Abbey_A to the level. Simply drag and drop these templates from the Root Templates panel as you would with any other item template. Once you have done so, you should have both objects in your level along side your Constellation object.

Adding Constellation configs to entities

Next we will add Constellation configs to the door and the lever you placed earlier, adding a config to a entity exposes the entity to Constellation and defines what kind of actions you can perform on it.

We will start with the lever. To add a Constellation config to the lever, select the lever in the Render Form and then in the sidebar, scroll down to Constellation Config Name and select the button with ... in it.

Note that some templates will come with the constellation config name already selected. This includes the PUZ_GEN_CONST_Lever_Floor_Rich_A template being used in this tutorial. For the sake of the tutorial, I have cleared out the selected config

MediaWiki Appliance - Powered by TurnKey Linux