One of the coolest things about adlengine is the ability to use its integrated descriptive scripting language. Designed to be simple to use yet powerful enough to handle complex requirements.
I will be looking at ways to make the scripting easier and soon you will be able to check if certain conditions are met, such as if skull=open then...
Once you have written a .verbose script you can use it again and again. My aim is to have collections of scripts available in a multitude of themes to allow quick world / scenario building.
-----------------------------------------------------------------------------------------------------
Take for example... CREATING A WORKING LIGHT & SWITCH...
you can download the .verbose file at https://www.adliberum.com/engine/scripts/ - just plug it into the folder and use the command "run build light" (available in build 1.1.54.8)
to import your own .verbose files after enabling creative mode... double click the top right of the screen, click the second file dialog button down and locate the .verbose file you wish to import on your computer.
.verbose files can be edited in notepad, notepad++ or other text editor
-----------------------------------------------------------------------------------------------------
// first enable creative mode....creative
---------------------------------- LEVEL 1 SCRIPTING ----------------------------------
// lets build a light...
build light
... and a switch to control it... //
build switch
// add some commands to control the light using the light switch.
if turn on switch then narrate the light came on. and room is well lit;
if turn off switch then narrate the light went out. and room is barely lit;
---------------------------------- LEVEL 2 SCRIPTING ----------------------------------
// update the description based on the lights state...if room is well lit then light.description is the light shines brightly
if room is barely lit then light.description is the light is off
Finally lets capture a few variations on how people might interact with the switch.
turn on light==turn on switch
turn off light==turn off switch
turn light on==turn on switch
turn light off==turn off switch
turn switch on==turn on switch
turn switch off==turn off switch
---------------------------------- LEVEL 3 SCRIPTING ----------------------------------
build bulb
// lets make it part of the light.
bulb.is inside light
// lets make it easier to interact with the object by allowing a shorter name variation.
lightbulb==bulb
// let's stop the switch from working...
if delete lightbulb then disable switch and room is barely lit
if disable switch then turn switch off==switch is broken and turn switch on==switch is broken
if switch is broken then narrate nothing happens.
// prevent the player putting another bulb in the lightif put bulb inside light then narrate There's already a bulb.
---------------------------------- LEVEL 4 SCRIPTING ----------------------------------
// allow the player to smash the bulb
if smash bulb then delete bulb and narrate darkness spills glass into the room.
if delete bulb then bulb is gone and if put bulb inside light then reset switch and reset light
if bulb is gone then room is barely lit and disable switch
// make the light go out if the bulb is taken / smashed
if lights out then no bulb and light goes out
if light goes out then turn off switch==switch is broken and turn on switch==switch is broken
// make the bulb hot when on
if turn on switch then bulb is hot
if turn off switch then bulb is hot
if bulb is hot then narrate Ouch!
---------------------------------- LEVEL 5 SCRIPTING ----------------------------------
// disable the switch if the bulb is broken or taken out!
if disable switch then turn off switch==switch is broken and turn on switch==switch is broken
if switch is broken then narrate nothing happens.
// allow the player to take the bulb out
bulb.if taken no bulb
// turn off the light if the bulb is smashed OR taken out
if no bulb then room is barely lit and reset light script
// reset the switch IF the player puts in a new bulb
if reset switch then if turn on switch then narrate the light came on. and if turn off switch then narrate the light went out.
// reset the light if a new bulb is put in
if reset light then room is well lit and let there be light
// and allow them to put a new bulb in
if reset light script then if put bulb inside light then reset switch
if let there be light then if turn on switch then narrate the light came on. and if turn off switch then narrate the light went out.
