Aller au contenu

Photo

How to teleport a player to an equal area in the same location?


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

I created a copy of my area and I'd like to teleport a player that are in the area old to the new area in the same location.

 

Example:

The player are on top of the ship.

I would like to teleport the player to the copy of the area on the top of the ship where he stopped.



#2
Baaleos

Baaleos
  • Members
  • 1 330 messages
I do this with my planar system.

I have spirit realms which are mirror images of my real world areas.

object oPC = GetFirstPC();
vector vPos = GetPosition(oPC);
object oAreaNew = // Insert area here
float fFacing = GetFacing(oPC);  // Think this gets the facing direction
location lNew = Location(oAreaNew,vPos,fFacing);
AssignCommand(oPC,JumpToLocation(lNew));

Doing this from memory, but I think its right?


  • WhiteTiger aime ceci

#3
Proleric

Proleric
  • Members
  • 2 361 messages
Travel Builder moves everything on a ship to a new area.

The ship doesn't have to be in the same position or orientation in the target area.

All creatures (e.g party and crew), placeables (e.g. wheel, bell, flag, containers & contents) and items dropped on the deck are moved.

... but if you just want to move one player, Baaleos's solution is perfect.
  • WhiteTiger aime ceci

#4
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
There is a Relative location function in the post here.    
  • WhiteTiger aime ceci

#5
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

I do this with my planar system.

I have spirit realms which are mirror images of my real world areas.
 

object oPC = GetFirstPC();
vector vPos = GetPosition(oPC);
object oAreaNew = // Insert area here
float fFacing = GetFacing(oPC);  // Think this gets the facing direction
location lNew = Location(oAreaNew,vPos,fFacing);
AssignCommand(oPC,JumpToLocation(lNew));

Doing this from memory, but I think its right?

 

thank you very much