A few questions

Randomdays
I've got most of things I'm trying to do figured out, but there's a couple of items I have questions on, and search isn't turning up much help

First, is it possible to move things around with the "show menu" script ? Putting the menu choices in a row across the screen instead of in a column? and for the normal column view, can there be an empty line between the choices to separate them?

Second, I'm trying to do something similar to the "Return to previous room" thread.

I've created an item called "beacon" and want to be able to drop it in any room and then use a simple game command script like "move object" to move the player to the location of the beacon. In game when I try using "move player object to beacon object" script , it moves me INTO the beacon and gives a few dictionary/ coordinates errors as well, probably since I haven't done any setup on the item except create it.

Can what I want be done be coded without complex scripting? If I cant' move to an object in a room, can I set the object so that I automatically exit it one I "jump" inside it to achieve the same thing in the end?

Thanks for any advice on these.

Silver
You would need to move player to parent of beacon object.

The Pixie
There is a show menu script command and a ShowMenu function. The latter can be modified if you have the offline editor and it should be possible to do what you want. At the bottom left do Filter - Show Library Elements, then find the ShowMenu function, then click Copy at the top right.

In code view, try just replacing the "msg" with "OutputTextNoBr" and see if what that does.

Silver
What is the code for moving the player to the parent of an object?

HegemonKhan
@Silver + @Randomdays:

--------------

moving (setting) an Object inside of another Object:

moving_Object_name.parent = destination_Object_name

-----------------

moving (setting) an Object to be inside the same Object as is another Object:

moving_Object_name.parent = destination_Object_name.parent

for example (Sgreig's 'Follower' code):

if (not player2.parent = player.parent) {
player2.parent = player.parent
}


room initially contains player and player2:

player.parent = room
player2.parent = room

player moves to room2:

player.parent = room2

room2 contains player:
player.parent = room2

room contains player2:
player2.parent = room

now, to move player2 to where player is, {conceptually}:

{player2.parent = player.parent = room2}
player2.parent = player.parent
{player2.parent = room2}

player2.parent = room2
player.parent = room2

room2, now contains player and player2

-----------

there's also the 'MoveObject' Function, as it is often more well-known-about than the built-in 'parent' Object (Type) Attribute:

MoveObject (moving_Object_name, destination_Object_name)

well, this too can do the exact same thing as the 'parent' Object Attribute:

MoveObject (moving_Object_name, destination_Object_name.parent)

---------

the built-in 'parent' Object Attribute is unfortunately a bit hidden (and not really discussed anywhere too: not wiki nor tutorial ~ I think) in trying to find it on the wiki, as it's found within the Object Element:

http://docs.textadventures.co.uk/quest/elements/
V
http://docs.textadventures.co.uk/quest/ ... bject.html
V
http://docs.textadventures.co.uk/quest/ ... arent.html

--------

and here is about Object (Type) Attributes (which the built-in 'parent' attribute is):

http://docs.textadventures.co.uk/quest/types/
V
http://docs.textadventures.co.uk/quest/ ... bject.html

also...

another common usage for Object Attributes is equipment (body part~slot = equipment Object):

<object name="sword">
</object>

<object name="player">
<attr name="right_hand" type="object">sword</attr>
</object>


player.right_hand = sword

(Object Name: player)
Attribute Name: right_hand
Attribute Type: Object
Attribute Value: sword (an actual Object in your game)

and...

there's another built-in Object Attribute too:

<object name="player">
</object>

<game name="xxx">
<attr name="pov" type="object">player</attr>
// it's shortened alternative syntax form is this:
// <pov type="object">player</pov>
</game>


game.pov = player

(Object Name: game)
Attribute Name: pov
Attribute Type: Object
Attribute Value: player (an actual Player Object in the game)

--------

here's the wiki link for 'MoveObject' :

http://docs.textadventures.co.uk/quest/ ... bject.html

-------

if you need help with any of this, let me know.

Silver
I thought it involved object.parent but then got confused thinking 'no that's a variable/attribute'

So basically they just have to move player to beacon.parent?

HegemonKhan
yep:

player.parent = beacon.parent
~OR~
MoveObject (player, beacon.parent)

Randomdays
Thank you for the help and quick responses. I'll try things out when I get home, but at least I know that what I want to get done, can be done

HegemonKhan
here's a more detailed explanation of the 'parent' Object Attribute (I couldn't find it until now):

viewtopic.php?f=10&t=5094
(see~scroll down, to my massive post)

ask if you got any questions or need any help.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums