EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   quest::movepc() (https://www.eqemulator.org/forums/showthread.php?t=30155)

neiv2 12-25-2009 08:10 PM

quest::movepc()
 
Is there some way to determine the heading a PC ends up facing when using quest::movepc()? The current syntax allows for zoneid, x, y, z, but not heading; e.g.,

quest::movepc(117,-931,-3471,182);

Any workaround for this?

cavedude 12-25-2009 08:28 PM

movepc does allow for heading. I added it myself ages ago.

neiv2 12-26-2009 12:28 PM

I'm using this list, which I assume is current. Taking my former example, namely:

quest::movepc(117,-931,-3471,182);

I want the pc to zone into Beholder at the specified x,y,z coords and face north. Here is what I've tried so far:

quest::movepc(117,-931,-3471,182); works, but faces south.

quest::movepc(117,-931,-3471,182, 3); works, but faces south. Faces south no matter what value I enter in place of 3.

quest::movepc(117,-931,-3471,182, heading=3); breaks quest script, will not zone pc.

The final example is the one provided in the QuestTutorial linked above. Am I misreading this somehow?

Wesell 12-26-2009 02:13 PM

What happens when you try this?
Code:

quest::movepc(117,-931,-3471,182, $client->GetHeading())

neiv2 12-26-2009 03:54 PM

That didn't make a difference since the client direction in the sending zone is opposite the intended client direction in the destination zone. The client direction when zoning is SE, but I want the client to face north in the destination zone.

joligario 12-26-2009 05:35 PM

Create a second spawnpoint, despawn the NPC when it arrives and respawn it on that spawnpoint with whatever heading you want.

cavedude 12-26-2009 07:01 PM

The syntax is quest::movepc(zone,x,y,z,h); I did update the wiki when I made the change, but it looks like those changes have been lost over time...

Heading worked when I was playing with it although I do remember it being buggy. I didn't actually work with the heading code, I just allowed movepc to have a user defined heading variable. If I remember, I had trouble too with north, but I think I finally got it by using a number out of the "normal" range (500 comes to mind for some reason) I find NPCs have the same trouble, and sometimes when I do a #spawnfix in-game, the NPC is given a really high heading number. It seems to work, though. I'm thinking it's because the client and the server have a different view on heading.

But then again, the change I made was probably over 2 years ago now. It is plausible that somebody could have made a change to something else that broke movepc, or heading in general.

neiv2 12-26-2009 11:15 PM

Yeah, it appears it is indeed broke. I tried using 255 (which generally faces north as well) in place of the 3, and then tried 500 (per your suggestion), and neither one makes any difference in the heading.

fyi, joligario, it looks like your reply was intended for a different thread : )

Wesell 12-27-2009 12:58 AM

Is the client turned to face south after movepc or is the heading simply left at whatever it was?

KLS 12-27-2009 02:38 AM

I'll take a look at it when I get a chance, I'm working on something else atm so it might be a bit if anyone else wants to.

Derision 12-27-2009 07:05 AM

This should be fixed in Rev1063.

joligario 12-27-2009 07:34 AM

Quote:

Originally Posted by neiv2 (Post 181996)
fyi, joligario, it looks like your reply was intended for a different thread : )

Sorry, wasn't paying attention. Thought you were moving an NPC rather than PC... That's what I get for using an iPod!

neiv2 12-27-2009 04:36 PM

Wessel, the client faces the same direction in the destination zone that he faced when he ran into the proximity of the transporter from the departing zone (south in both cases). I'm trying to force him to face north in the destination zone.

KLS, thanks for your response.

Derision, I'm using the latest AX repack, which appears to be based on r1048.

Derision 12-28-2009 05:44 AM

As a workaround, until you are able to upgrade, you could call $client->SetHeading(<heading>) right before quest::movepc.

Lillu 12-28-2009 06:56 AM

Thanks for the workaround Derision, works perfectly!


All times are GMT -4. The time now is 05:46 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.