Larian Banner
Previous Thread
Next Thread
Print Thread
Joined: Sep 2017
Location: UK
apprentice
OP Offline
apprentice
Joined: Sep 2017
Location: UK
How do you add an NPC to your party using a dialog (and remove them from your party using this procedure...

I understand "Tinkerer", has a detailed script, if they could post it that would be most useful.

Last edited by Scottworld; 18/10/17 10:58 PM.
Joined: Sep 2017
M
member
Offline
member
M
Joined: Sep 2017
I use this: (only thing you need to do is set same flag in dialog)


IF
ObjectFlagSet("QuestUpdate_HF_Swamp_dream",(CHARACTERGUID)_Player,_Instance)
THEN
CharacterAddToParty(CHARACTERGUID_Animals_Rat_A_000_637cd430-5760-455e-a6c0-c6e58c2c851c,_Player);
CharacterMakePlayer(CHARACTERGUID_Animals_Rat_A_000_637cd430-5760-455e-a6c0-c6e58c2c851c);

If you want to play as player with npc add "CharacterMakePlayer" otherwise only "CharacterAddToParty" and he will follow butdo his own stuff.

works for me smile

Edit; to remove i use

IF
CharacterEnteredTrigger(_Player,TRIGGERGUID_EventTrigger_cheese_82fea7f4-fbeb-4d85-8448-74dd4bc6299b)
THEN
ObjectSetFlag(CHARACTERGUID_S_GLO_CharacterCreationDummy_001_da072fe7-fdd5-42ae-9139-8bd4b9fca406, "HasCheese");
CharacterRemoveFromParty(CHARACTERGUID_Animals_Rat_A_000_637cd430-5760-455e-a6c0-c6e58c2c851c);



Last edited by monzua; 18/10/17 11:08 PM.
Joined: Sep 2017
Location: UK
apprentice
OP Offline
apprentice
Joined: Sep 2017
Location: UK
thankyou sir..... I shall give this a try.

Joined: Sep 2017
Location: UK
apprentice
OP Offline
apprentice
Joined: Sep 2017
Location: UK
Got it !!!
Here is the code... you also need a CharacterMakeNPC to set them back to a non-player on leave. (keeps it all clean)

IF
ObjectFlagSet("Galwin_InParty", _speaker, _)
THEN
CharacterMakePlayer(CHARACTERGUID_HK_Companion_Galwin_42c0121f-c906-416d-abaf-9b9e91f17b65);
ShowNotification("Galwin Joined Your Party");

IF
ObjectFlagSet("Galwin_LeaveParty", _speaker, _)
THEN
CharacterMakeNPC(CHARACTERGUID_HK_Companion_Galwin_42c0121f-c906-416d-abaf-9b9e91f17b65);
CharacterRemoveFromParty(CHARACTERGUID_HK_Companion_Galwin_42c0121f-c906-416d-abaf-9b9e91f17b65);
ShowNotification("Galwin Left Your Party");


I shall make a tutorial on this once I have 5 mins.

Joined: Sep 2017
Location: UK
apprentice
OP Offline
apprentice
Joined: Sep 2017
Location: UK


Moderated by  Larian_Koala 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5