Jump to content
FAGC

Home item teleporting system

Recommended Posts

Hello community! How is it going?

 

I need help with a teleporting system, i'll explain it so you can tell me what i can do to make it real!

 

The home of the player will be a map that can be accessed via an item. I want that item to be used only in towns (specific maps)
When you activate it in a town, it will place a teleport to the home map, and you can go in and out of that map at will (always returning to the same town)
When activated in a new town it will place the teleport there, but erasing the previous one.
How can i do this?

Share this post


Link to post
Share on other sites

Sounds like it can be done with common events and variables, and at least one switch.

 

Alright.

 

What we want to do is set up the needed variables and switches.

 

You need to have one variable get the Map X Coordinate of where you want the player to teleport to.

One more needs to get the Map Y Coordinate for the same purpose.

One more will be used to store the Map ID.

 

Next, we want three more variables to capture the Map ID, X and Y Coordinates of the player's home (likely wanting to be in front of the map).

 

So, for the first three variables, we want to create a Common Event with Conditional Branches that will have the condition of if the player is in a specific map when accessing the teleport item. If neither of these branch conditions are met, need to have some indicator of something not working.

 

Then, in each conditional branch, have the first three variables capture the Map X and Y Coordinates, as well as the Map ID, and then the Teleport spot is set...sort of.

 

As for the home teleport spot, I would have an event record those three variables and then just keep them in reference but not the event itself.

 

Once the teleport spot is set, you must use a Transfer Player event, and have it transport the player using the variable values.

 

I must say this as a bit of warning. If you use maps for more than just a town, you'll be able to use the Teleport Spot on that map no matter what unless you have a disabling switch active, which is why I suggested using a switch.

 

And that should do it, really.

  • Like 1

Share this post


Link to post
Share on other sites

Sounds like it can be done with common events and variables, and at least one switch.

 

Alright.

 

What we want to do is set up the needed variables and switches.

 

You need to have one variable get the Map X Coordinate of where you want the player to teleport to.

One more needs to get the Map Y Coordinate for the same purpose.

One more will be used to store the Map ID.

 

Next, we want three more variables to capture the Map ID, X and Y Coordinates of the player's home (likely wanting to be in front of the map).

 

So, for the first three variables, we want to create a Common Event with Conditional Branches that will have the condition of if the player is in a specific map when accessing the teleport item. If neither of these branch conditions are met, need to have some indicator of something not working.

 

Then, in each conditional branch, have the first three variables capture the Map X and Y Coordinates, as well as the Map ID, and then the Teleport spot is set...sort of.

 

As for the home teleport spot, I would have an event record those three variables and then just keep them in reference but not the event itself.

 

Once the teleport spot is set, you must use a Transfer Player event, and have it transport the player using the variable values.

 

I must say this as a bit of warning. If you use maps for more than just a town, you'll be able to use the Teleport Spot on that map no matter what unless you have a disabling switch active, which is why I suggested using a switch.

 

And that should do it, really.

 

I did exactly what you said and.... it worked!!!

Thank you very much, you were very helpfull.

Problem solved, can this thread be closed, please?

  • Like 1

Share this post


Link to post
Share on other sites

Problem solved, can this thread be closed, please?

As you wish!  :)

Additionally you can mark the thread as solved by picking the reply with solution. There's that 'Mark Solved' button next to Quote, Edit etc.. That way, requesting locking threads will be easier to spot for the staff.  ;)

  • Like 1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted