|
|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
| Quests::Q&A This is the quest support section |

12-27-2009, 04:36 PM
|
|
Hill Giant
|
|
Join Date: Mar 2009
Location: CO
Posts: 183
|
|
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.
|

12-28-2009, 05:44 AM
|
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
As a workaround, until you are able to upgrade, you could call $client->SetHeading(<heading>) right before quest::movepc.
|

12-28-2009, 06:56 AM
|
|
Hill Giant
|
|
Join Date: Sep 2008
Posts: 204
|
|
Thanks for the workaround Derision, works perfectly!
__________________
|
 |
|
 |

12-29-2009, 02:43 PM
|
|
Hill Giant
|
|
Join Date: Mar 2009
Location: CO
Posts: 183
|
|
Thanks, Derision, but for some reason it's still not working. Here is the script for my transporter NPC:
Code:
sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 60, $x + 60, $y - 60, $y + 60);
}
sub EVENT_ENTER
{
$client->SetHeading(0);
quest::movepc(16,-63,-802,59);
}
The transporter stands at a point that forces a PC to enter his proximity at a heading of SE. When the PC enters the proximity of the transporter, I can see by my compass that the heading changes from SE to N right before zone (hence, the $client function is working, at least initially). However, when I land in the destination zone, I end up facing SE again.
Lillu, I'd be interested in knowing if my script works on your server (particularly, whether you end up facing North in Beholder coming from a heading of SE in the sending zone as you enter the transporter's proximity using my script). I'd also like to see if I can reproduce your results with the script that you said works perfectly. Could you post that script here? Thanks.
|
 |
|
 |

12-29-2009, 03:30 PM
|
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
You will need to put a heading parameter in the quest::movepc call. Any heading, it doesn't matter what. If you leave the heading parameter off, it will default to a heading of zero.
If there is a heading there, the bug in the code prior to 1063 will mean it will use whatever heading you are currently facing, which should be the heading you set with $client->setheading().
This is the quest I used to to test the workaround:
Code:
sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("I am Guard Philbin.");
$client->SetHeading(45);
quest::movepc(2, -223, 694, 4, 128);
}
}
And I ended up in North Qeynos with a heading of 45.
Edit: After reading your post again, my explanation doesn't make sense, but try putting a random heading in the movepc call and see if it uses the heading from your $client->SetHeading call 
|

12-29-2009, 04:33 PM
|
|
Hill Giant
|
|
Join Date: Mar 2009
Location: CO
Posts: 183
|
|
Thanks, Derision; that failed to work as well. My code now looks like this:
Code:
sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 60, $x + 60, $y - 60, $y + 60);
}
sub EVENT_ENTER
{
$client->SetHeading(0);
quest::movepc(16,-63,-802,59,0);
}
I also tried plugging in your headings, and placing the $client function after the quest::movepc function, and got the same results.
|
 |
|
 |

12-29-2009, 05:08 PM
|
|
Hill Giant
|
|
Join Date: Mar 2009
Location: CO
Posts: 183
|
|
I did some further testing on this and found an oddity. I changed the event from an ENTER to the following SAY, and it works:
Code:
sub EVENT_SAY
{
if($text=~/Hail/i)
{
quest::say("You are taking a dangerous road, $name.Beware.");
$client->SetHeading(255);
quest::movepc(16,-63,-802,59,255);
}
}
The PC successfully faces north (incidentally, I tried 0 in place of 255--which should also face north--and it it ignored). When I change it back to an ENTER event, . . .
Code:
sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 60, $x + 60, $y - 60, $y + 60);
}
sub EVENT_ENTER
{
quest::say("You are taking a dangerous road, $name. Beware.");
$client->SetHeading(255);
quest::movepc(16,-63,-802,59,255);
}
. . . the heading is again ignored, and I simply land in Beholder facing SE again. The only difference between these scenarios is the event I am using. I am facing the same direction when triggering both events, and the functions are otherwise identical. Is it possible it it the ENTER event that is broken and not the quest::movepc() function?
|
 |
|
 |
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 08:24 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |