Thread: quest::movepc()
View Single Post
  #23  
Old 08-31-2010, 05:04 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Quote:
Originally Posted by neiv2 View Post
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?
Perhaps have the '$client->SetHeading();' process AFTER quest::movepc();
Reply With Quote