So I'm using FP4's movement script for npcs (
http://forums.graalonline.com/forums...ad.php?t=85370)
and I'm trying to let the actions be interrupted so the npc will stop to chat and other stuff, w/o it being set in the actions and instead by onPlayerTouchsMe, I've added these to the level npc (remember fp4's stuff is also there, these are just additions, I believe the way I'm triggering is probably the problem):
PHP Code:
function onCreated()
{
level.npc.jaqor = this;
}
// Function to stop the walk of the npc when chatting with a player
function onStopWalk()
{
echo("trigger");
// save this.actions
this.actionsSaved = this.actions;
this.actions = {
"wait: 9000"
};
this.savActPos = this.actionpos;
doAction(0);
}
// Function to resume original actions
public function onResume()
{
echo("resume");
this.actions = this.actionsSaved;
doAction(this.savActPos);
}
//#CLIENTSIDE
function onPlayerTouchsMe()
{
this.trigger("StopWalk");
findweapon("-System/NPCDialog").loadDialog(this.head, this.speaker, this.msg, this.options);
}
The weapon calling at the bottom eventuall sends to this serverside trigger in the weapon (and yes it does reach it)
PHP Code:
function onActionServerside()
{
if (params[0] == "moveNPC")
{
//echo("server");
level.npc.(@params[1]).trigger("Resume");
}
}
//#CLIENTSIDE
function doesntReallyMatter()
{
triggerserver("gui", this.name, "moveNPC", this.speaker);
}
It seems it's not getting to either trigger on the lv npc at all. if I echo on the wep trigger to server action it does get to that though...