You are on top of a hill overlooking a field. Trees and rocks line the edge of the field. You can go north.
>x rocks
More like boulders, really, some as high as ten feet.
>x trees
The trees are mainly pines.
>n
You are in the middle of a field. The rocks and trees provide good cover from the road. You can go north or south.
>x rocks
I can't see that (rocks).
XanMag wrote:Click on the object you want copied in the tree. Click the copy button at the top of the tree and click the room you want to put the copied object in. Then click the paste button. =)
Forgewright wrote:I think you just add the alias "tree" to the first tree before copying and quest will use the alias in the command for each copied object in each room.
XanMag wrote:Trees or trees1 is still recognized as trees as lamb would be recognized as Lamborghini or Lamborghini1.
OurJud wrote:Thing is, I wasn't saying it didn't recognise it, I was asking how it does. In the second location where I copied the trees, they're listed as 'trees1', but my point is, 'x trees' still throws up the description.
Marzipan wrote:The player only has one tree object in the location they're standing in. That's the one it gives you the description of.
jdpjdpjdp wrote:
Because it's not just copying the name, it copies everything stored within the item. If you are in the GUI, click through the tabs and you'll see it's all filled out identically.
jdpjdpjdp wrote:The short explanation is that commands look for the object's alias first, not the object name. Object names all have to be unique, but you can have any number of objects with the same alias. In this example, the original object was called "trees" and likely also had the alias "trees". The copy had the name changed, because objects need unique names, but the alias, just "trees", is the same for both.
That's my understanding of it anyway. If it's wrong, someone with a more intimate knowledge of the program can correct me.
<command name="tree_look_command">
<pattern>tree</patterm> // you just need to type in 'tree', the scripting handles the rest for you
<script>
foreach (object_x, GetDirectChildren (player.parent)) // searches through all the objects in the room that you are in
{
if (object_x.alias = "tree") // if any of the objects have the alias of 'tree', then...
{
do (object_x.look) // run that object's 'look' Verb (Script Attribute)
}
else
{
msg ("You don't see any trees within your level of eyesight.")
}
}
</script>
</command>
Forgewright wrote:From earlier posts, I see the GUI uses the first 4 letters of an object to determine if it is the referenced object by the player, but I found in some cases it will use the first letter if that is what the player input. X W command will trigger objects like wood, or William (if this is a player or character name, which is aggravating but is work aroundable. Although the player intended to look West, they get a list of all objects that start with W.
The Pixie wrote:"Forgewright"
From earlier posts, I see the GUI uses the first 4 letters of an object to determine if it is the referenced object by the player, but I found in some cases it will use the first letter if that is what the player input. X W command will trigger objects like wood, or William (if this is a player or character name, which is aggravating but is work aroundable. Although the player intended to look West, they get a list of all objects that start with W.
I think it grabs all the objects in scope (held or in the room), and tries to match each, keeping a list of full matches, where the whole word is a match, and a list of partial matches, matching part word.