Teleportation

I asked this question some time ago but have since made an error in copying it. I have lost the original thread
I have no knowledge of coding .
I wish to teleport the player to the location of an object called box. The box may be at any location in the game. He/she is not to be in the box, but beside it.
I moved the player(game.pov) to expression ObjectListItem(FilterByAttribute(ListParents(box),”isroom”,true),0)
This generates an error right at the end of the expression. I seem to have inadvertently mixed something up. Due to my lack of knowledge I am unable to know what to correct. Could some kind person put me right please.


Too many times, the simplest solution is too simple to see...
Try:
player.parent=box.parent
(or parrent)
This should move the player to the same room as the box.


If you are using a map, it gets more complicated:
https://docs.textadventures.co.uk/quest/showing_a_map.html


Thanks a lot both of you. That worked. I am not bothering about using a map anyway Pixie Too complex.
I was told by the person who gave me that moving formula that the complications were to allow for someone putting the box in a container causing problems. But then that’s their problem isn’t it.
Thanks again.


Log in to post a reply.

Support

Forums