What's the (room-)attribute for ''Objects here go to:''?

In an object's room tab is the option to set an object where dropped objects go to. I want to know what the attribute for this option is, because I want it to be an expression.
(Couldn't find it in the Documentation)


Not sure how many people use that option, but...
If you are climbing a tree, and you drop something, it could be used to drop that object to the ground. (IE the room the tree in in.)
Or, you are in a room where the floor is a grate, anything dropped would fall to the room below the grate.
At least, that's my thought.


If you are climbing a tree, and you drop something, it could be used to drop that object to the ground. (IE the room the tree in in.)

Yes, and if the tree is a randomly cloned object, an expression for that option would be useful (in the tree's room tab):
Objects dropped here go to: this.parent or exit.to

Or, you are in a room where the floor is a grate, anything dropped would fall to the room below the grate.

Maybe some items are to large to slip through the grate. Anyway, it seems like the Quest UI couldn't show an expression as that option's value.
Makes more sense to handle it via the drop script for each object individually...


I think the only time I've used it was remaking an 80s game "Circus", where objects dropped on the tightrope land in the ring below.

The attribute is dropdestination. Sadly, it can't be an expression; it needs to be an object attribute. However, if you're using the desktop version of Quest there's nothing to stop you altering the DoDrop function to allow it to be an expression.

Somethinglike this (click for code) Change this part: ``` if (HasObject(game.pov.parent, "dropdestination")) { destination = game.pov.parent.dropdestination } else { destination = game.pov.parent } ```1 to ``` destination = game.pov.parent.destination if (TypeOf (destination) = "string") { destination = eval (destination, QuickParams ("this", game.pov.parent, "object", object)) } if (Equal (destination, null) or not TypeOf (destination) = "object") { destination = game.pov.parent } ```

It's worth noting that if you are writing a specific "drop" script for the object, this will be accessible as the `destination` variable. It's important to make sure that your custom drop scripts use `destination`, because those scripts are also called for "put object in box" commands – it seems that people on the forum often recomment code using `player.parent` or `game.pov.parent` in a drop script, which would have the side effect of meaning that ytou can't put those objects in a container.

Sorry, I missed this part of the question:

Yes, and if the tree is a randomly cloned object, an expression for that option would be useful (in the tree's room tab):
Objects dropped here go to: this.parent or exit.to

In this case, you don't need it to be an expression. You could do something like:

newclone = CloneObjectAndMove (tree, SomeExpressionToDetermineWhereToPutIt())
newclone.dropdestination = newclone.parent

when you're creating the clone.
Or if it might move around, you could give it a changedparent script that simply says:

this.dropdestination = this.parent

Log in to post a reply.

Support

Forums