Lock the door
Now, we need to get the door locked.
As you will see if you consult the Developers' Reference, this can be done by adding some attributes to the door (LINK object). In practice, you tell DimensioneX that the door is closed and locked.
Edit the world.dxw file, and modify the LINK definition for passage w2 so that it looks like this (modifications are in bold):
Now save, and restart the game for another test, exactly as you did for. You will see that the door is closed, and if you try to open it the system tells you it's locked.
Look at the inserted code:
In DimensioneX, much of the object behaviour is controlled by the objects' attributes. The system already knows how to handle the most frequent cases (closed, locked doors, heavy or hidden objects, etc) so no programming effort is required from you. Everything else is done by you via simple scripts (this may require little programming skills).
You just had a demonstration of what the open and locked attributes can do; a programming example will be left as the last step.
Now, proceed to the next step.