EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   NPC Movement/Facing During Hail Interaction (https://www.eqemulator.org/forums/showthread.php?t=39436)

utbbop 03-04-2015 06:43 PM

NPC Movement/Facing During Hail Interaction
 
Anyone know if you can disable how an NPC turns and faces the PC who hails them? Trying to lock down a few non-humanoid type quest NPC from reacting visually to a hail.

Appreciate the help!

joligario 03-04-2015 07:45 PM

In npc.cpp function DoQuestPause there are calls to FaceTarget.

utbbop 03-04-2015 10:36 PM

I am not skilled enough yet for cpp stuff. Appreciate the offer though!

ghanja 03-04-2015 11:00 PM

Quote:

Originally Posted by utbbop (Post 238360)
I am not skilled enough yet for cpp stuff. Appreciate the offer though!

I don't know the purpose of this NPC, or what his/her/it's interaction includes, however, if it's just a passive/"busy" type of NPC, you may be able to make use of npc_emotes table, then place a value in the corresponding 'emoteid' column in the npc_types table.

utbbop 03-04-2015 11:15 PM

Quote:

Originally Posted by ghanja (Post 238363)
I don't know the purpose of this NPC, or what his/her/it's interaction includes, however, if it's just a passive/"busy" type of NPC, you may be able to make use of npc_emotes table, then place a value in the corresponding 'emoteid' column in the npc_types table.

Just trying to make object type (meaning they have a race model of a treasure chest) npc's that can also be a quest. My "issue", more like annoyance, is that upon hailing these "objects" (NPC's) they turn and face the PC.

It mildly annoys me to see a chest moving around like that :)

Kingly_Krab 03-04-2015 11:25 PM

Well, it currently looks like this:
Code:

void NPC::DoQuestPause(Mob *other) {
    if(IsMoving() && !IsOnHatelist(other)) {
        PauseWandering(RuleI(NPC, SayPauseTimeInSec));
        FaceTarget(other);
    } else if(!IsMoving()) {
        FaceTarget(other);
    }
}

You could probably do something like this (assuming your chests don't ever move):
Code:

void NPC::DoQuestPause(Mob *other) {
    if(IsMoving() && !IsOnHatelist(other)) {
        PauseWandering(RuleI(NPC, SayPauseTimeInSec));
        FaceTarget(other);       
    } else if(!IsMoving() && GetRace() != 378 && GetRace() != 589 && GetRace() != 590) {
        FaceTarget(other);
    }
}


ghanja 03-04-2015 11:52 PM

Quote:

Originally Posted by utbbop (Post 238365)
Just trying to make object type (meaning they have a race model of a treasure chest) npc's that can also be a quest. My "issue", more like annoyance, is that upon hailing these "objects" (NPC's) they turn and face the PC.

It mildly annoys me to see a chest moving around like that :)

Well, if someone went around talking to a chest, seeing it move wouldn't be much crazier.

KC suggested what I would've depending on your reply, run with that.


All times are GMT -4. The time now is 09:16 AM.

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