Page 1 of 1

Teleport

Posted: Mon Jun 27, 2016 7:35 pm
by Gangrenous
Everyone remembers these things in South Qeynos, they are not a zone object, more like some type of emitter. If I wanted to use these as a teleporter, what are my options? I could put an invisible NPC in place but I am not seeing how to make a spawn invis.

Re: Teleport

Posted: Mon Jun 27, 2016 9:31 pm
by Jabantiz
`transporters` table should allow you to set a location that when a player enters it they are automatically teleported to the destination.

Re: Teleport

Posted: Tue Jun 28, 2016 5:49 am
by Gangrenous
Not seeing anywhere in the editor to modify this, guess I know what I will be doing today.

Re: Teleport

Posted: Tue Jun 28, 2016 7:13 am
by Gangrenous
In case anyone else has the same questions as me, here is the original thread by LethalEncounter.

http://eq2emulator.net/phpBB3/viewtopic ... port#p8930

Re: Teleport

Posted: Tue Jun 28, 2016 6:16 pm
by Gangrenous
This is working perfectly except the heading on the destination appears to always go to 180 degrees no matter what I set it for.

Re: Teleport

Posted: Tue Jun 28, 2016 6:57 pm
by Jabantiz
Heading is not used when it is a port within the same zone.
LethalEncounter wrote:Notes:
1. destination_heading is only used if the player leaves the zone.

Re: Teleport

Posted: Tue Jun 28, 2016 7:05 pm
by Gangrenous
So you cannot steer the player's heading when they are in the same zone? I would think you would want to. We may really want to change that.

Re: Teleport

Posted: Wed Jun 29, 2016 7:59 am
by Gangrenous
So minor change to zoneserver.cpp, mostly works except that thing where some headings seem to spin you in the wrong direction. Case in point a heading of 120 puts you at 300, exactly 180 degrees off. Your previous code solved that issue so my source now has this in zoneserver.ccp around line 2596

Code: Select all

EQ2Packet* packet = client->GetPlayer()->Move(loc->destination_x, loc->destination_y, loc->destination_z, client->GetVersion(), (loc->destination_heading == 0 ? -1.0f : (loc->destination_heading + 180.0f)));