Aller au contenu

Photo

Make an NPC stay seated during conversation - Can it be done?


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
Pstemarie

Pstemarie
  • Members
  • 2 745 messages

Is it possible to make an NPC stay seated during a conversation? I can make a placeable with the NPC "mounted" to it, but its much better if I can use an actual creature for this sequence as the conversation could lead to a fight and its a lot cleaner if the creature just gets up and attacks.


  • WhiteTiger aime ceci

#2
GhostOfGod

GhostOfGod
  • Members
  • 863 messages

Yep. You give them a script in their "OnSpawn" event to make them sit and then in the conversation on the very first line in the "ActionsTaken" tab you basically give them the same script. This just requires that they have at least a one line conversation. Example script:

 

void main()
{
    string sChair = GetLocalString(OBJECT_SELF, "MY_CHAIR");
    object oChair = GetObjectByTag(sChair);

    if (GetIsObjectValid(oChair))
    {
        ClearAllActions();
        ActionSit(oChair);
    }
}


  • Pstemarie, Kato - et WhiteTiger aiment ceci

#3
Pstemarie

Pstemarie
  • Members
  • 2 745 messages

Worked like a charm.