How to: current location?
Frederik
21 May 2013, 13:33Hello guys,
I've been busy for quite a while now with my game - recently deleted 3/4 of my code cause of unnecessary complicatedness - but currently stuck with obtaining the current location of the player. So, I'd like to have a command - if there is one - or to create a function which gives me the current location of the player.
So whether he is in a house or a yard, it should give me that location as a string. Can you guys help me with this?
Thanks in advance,
Frederik
I've been busy for quite a while now with my game - recently deleted 3/4 of my code cause of unnecessary complicatedness - but currently stuck with obtaining the current location of the player. So, I'd like to have a command - if there is one - or to create a function which gives me the current location of the player.
So whether he is in a house or a yard, it should give me that location as a string. Can you guys help me with this?
Thanks in advance,
Frederik

guzmere
21 May 2013, 13:50I know that if you print an expression for player.parent it will give you location of the player. If that is what you are asking? Terry
Happy Adventuring 



Pertex
21 May 2013, 14:08player.parent.alias or player.parent.name returns the location as string. If you have multiple player characters you should use game.pov.parent.name
Frederik
21 May 2013, 16:57Awesome! Exactly what I needed! I bet it would've taken me two days to find that out...
Thanks you guys!
Thanks you guys!