Jump to content

Recommended Posts

Posted

I am making a portal that behaves similarly to the existing nether portals.  When I teleport the player into the other dimension, it places them in an existing or new portal.  Either way, the interaction with the portal blocks immediately triggers another teleport back to the overworld, and then back to the nether, etc.

 

I put in a countdown, but it only gets updated when the player is standing in the portal blocks, and is a cumbersome workaround.  What I'd really like is a way to flag the player as already being teleported until they leave and re-enter the portal, but am struggling with this.  I was thinking an event might work, but am not familiar with them and am not sure which one, if any, would help here.

 

Any input is appreciated.

 

Also, as an aside, I am also trying to duplicate the "wavy effect" that comes with standing in the portal after arriving in the other dimension, but am having difficulty tracking down where that happens or what triggers it.  Any help with this is also appreciated.

Posted

What if you teleport the player 1 block forward from the portal inn the direction he would be facing when he exits the portal?

 

If you guys dont get it.. then well ya.. try harder...

Posted

Thanks.  That is a good idea, but one I've already dismissed.  The portal spawning might be in mid air and putting the player forward a space may drop them to their death.  I could spawn a platform, too, but I'd rather leave this as my "last resort".

Posted

In my stargate mod, rather than triggering teleportation when the player stands in a particular place, I detect when he passes through a plane at the centre of the portal. If the player's posX, posY, posZ is on one side of the plane, and his prevPosX, prevPosY, prevPosZ is on the other side, then teleportation occurs.

 

I do it this way because I want the player to be able to just walk straight through the portal without stopping. It seems to work very well, and I've never had any problems with bouncing.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.