Teleportation & coordinates

● ARCHIVED · READ-ONLY
Started by Nitroxone 5 posts View original ↗
  1. Hi all,

    First and foremost : english is not my native language, I apologize in advance because it may be hard to understand me.

    I've created a simple system that teleports you at the exact same location on a "mirror map" when you press a button.
    But, one of those maps is actually several years later than the first one (like a time travel).

    Obviously, I've moved some objects on one of the maps ; and the player cannot walk on these (beds or boxes for example).

    So, how can I make sure the player does not teleport onto one of these objects ?
  2. First of all, your English is almost perfect in your post. No need for apologies.

    Can the player time travel (switch maps) wherever they like? I'm assuming this is the case but I want to make sure.

    If so, you actually have a really good question. I'm assuming you want them to appear at least very close to where they left from and not always in the same spot. I wonder if there's a good way to tag several spots with a Region ID and then find the nearest one that matches your desired coordinates.

    This is an interesting one so I'm willing to bet that there will be at least a few people here that will start experimenting with this to find a solution. I, unfortunately, won't be by my computer for a while to mess around with it right now.
  3. Thanks for your answer !

    Yes, the player would be able to teleport anywhere, anytime (like in The Silent Age, if you have played it).

    I'm still thinking on a way to tag terrains and make sure the player does not teleport on these, but I can't seem to find a solution right now ... Still need help :/
  4. you can use the event command "get location info" to check data about a position, but that command only works for the current map.
    So depending on what exactly you want to do you could either make an autorun on the other map that checks if a position is wrong directly after the teleport (for example terrain tag on the tileset), or you could use something like region ID on the current map to indicate which positions would cause problems with teleporting (this would require you to make the Region-ID into a pseudomap of the other map)

    any more complex variants would require a plugin to handle, and most likely that would have to be a special plugin commission instead of a free plugin request because others might not be able to use it.
  5. Okay, thanks Andar !

    Here is the method I've used :
    I placed region IDs on the tiles that cause problem with teleporting. Then, when the player tries to teleport, I simply check if he is on one of those tiles.
    This simple system seems to be working now.

    Thanks for your help !