Certain attributes in certain commands can be provided in their longform.
To access the longform of a command, strip the command of all of their attributes, then create { and } characters.
e.g.
: create {
// TODO :: Press Control + Space on blank lines here to access attributes
}
On blank lines you will be presented with attributes of the command.
The code completion does not present it - but some attributes can have their attributes provided by expression rather than by explicit value.
Dynamic attibutes can be provided in the following form
key -> ( some_expression )
e.g.
In the simple case (key + fixed value), you could write
// Sets the target to be the entity with id, teleport_pad
target = teleport_pad
Or you could do the following (expression form between the ( ) ).
// Sets the target entity to be the parent (location or entity) of entity with id of "teleport_pad"
target -> (
parent_of "teleport_pad"
)
This is not very well documented at the moment, but it is available in a lot of places, and if you follow this method, the editor will tell you which attributes allow dynamic expressions.
To put this in context, here is a complete example of how to solve your problem:
start_at = lakeside
locations {
lakeside : location "You are by the side of a lake.";
forest : location "You are in a forest." ;
treetop : location "You are in a treetop." ;
outside_castle : location "You are outside the castle." ;
castle : location "You are inside the castle." ;
}
connections {
from, direction, to = [
lakeside, north, outside_castle,
outside_castle, north, castle,
lakeside, east, forest,
forest, up, treetop,
]
}
objects {
lamp : object "a lamp" at = "inventory" ;
teleport_pad : object "a teleport pad" at = "forest" ;
}
on_command {
: match "test _" {
: print "The lamp will be sent to the parent location of the teleport pad." ;
: create {
entity = lamp
target -> (
parent_of "teleport_pad"
)
}
}
}