Arphahat Posted February 3, 2013 Posted February 3, 2013 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. Quote
Mazetar Posted February 3, 2013 Posted February 3, 2013 What if you teleport the player 1 block forward from the portal inn the direction he would be facing when he exits the portal? Quote If you guys dont get it.. then well ya.. try harder...
Arphahat Posted February 3, 2013 Author Posted February 3, 2013 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". Quote
gcewing Posted February 5, 2013 Posted February 5, 2013 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. Quote
Recommended Posts
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.