Author Topic: NPC pair's parting dialogue  (Read 1360 times)

Offline Miss Sakaki

  • Planewalker
  • *****
  • Posts: 62
  • Gender: Female
NPC pair's parting dialogue
« on: October 20, 2005, 11:46:47 AM »
I've been working on a pair of NPCs who leave and join a party together. The problem that I've been having is that while I can get both of them to leave together, when I go to pick them up again one of them comes up to Player1 as if about to initiate dialogue. I have a script that specifies what happens when one leaves, so after the leaving dialogue I have:

IF ~~ THEN DO ~SetGlobal("FHLJoined","GLOBAL",0)
SetGlobal("FHLKicked","GLOBAL",1)
MoveGlobal("AR0700","FHLSEB",[2140.2409])~
EXIT
END

...and in Andrei's script I have:

IF
Global("FHLKicked","GLOBAL",1)
InParty(Myself)
THEN
RESPONSE #100
LeaveParty()
MoveGlobal("AR0700","FHLAND",[2169.2452])
END

I've also tried putting ActionOverride("FHLAND",MoveGlobal("AR0700","FHLAND",[2169.2452])) into Sebastian's code, but the same thing happens.
Would you give a guy a foot massage? If so, maybe you'd like Nathaniel.

What's a little falsehood between friends? The mysteries of The Luxley Family are soon to be unravelled.

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: NPC pair's parting dialogue
« Reply #1 on: October 20, 2005, 12:35:54 PM »
Check their scripts to see if they have anything that would make them walk up to the player to initiate dialogue, like, say, NumTimesTalkedTo(0).  Also make sure they aren't falling prey to the dplayer3.bcs problem.
Earn Money Sleeping.

Offline Lu

  • Planewalker
  • *****
  • Posts: 750
  • Gender: Female
Re: NPC pair's parting dialogue
« Reply #2 on: October 20, 2005, 12:47:23 PM »
Quote
when I go to pick them up again one of them comes up to Player1 as if about to initiate dialogue

   Each party member has a block in his/her scripts that makes him/her start a respective dialog with
 Player1 when kicked out (smth like "Do you want us to part?"), that's why one of your NPC's (in this
 (case it's definitely Andrei) wants to talk to PC as soon as he sees him/her again

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: NPC pair's parting dialogue
« Reply #3 on: October 20, 2005, 02:58:39 PM »
Quote
when I go to pick them up again one of them comes up to Player1 as if about to initiate dialogue

   Each party member has a block in his/her scripts that makes him/her start a respective dialog with
 Player1 when kicked out (smth like "Do you want us to part?"), that's why one of your NPC's (in this
 (case it's definitely Andrei) wants to talk to PC as soon as he sees him/her again

If the .cre file hasn't been created properly, yes.  That's what I was asking above.
Earn Money Sleeping.

Offline Lu

  • Planewalker
  • *****
  • Posts: 750
  • Gender: Female
Re: NPC pair's parting dialogue
« Reply #4 on: October 20, 2005, 05:38:23 PM »
   If I'm not mistaken, every NPC gets DPLAYER2 as DEFAULT script on joining the party
   The 1st block in DPLAYER2 is as follows:
IF
  !InParty(Myself)
  HPGT(Myself,0)
THEN
  RESPONSE #100
    SetLeavePartyDialogFile()
    Dialogue(Player1)
    ChangeAIScript("",DEFAULT)
END

   So, there's more than one easy way to solve Miss Sakaki's problem

Offline Miss Sakaki

  • Planewalker
  • *****
  • Posts: 62
  • Gender: Female
Re: NPC pair's parting dialogue
« Reply #5 on: October 20, 2005, 09:05:18 PM »
To confirm: the original cres have the correct scripts. Andrei has FHLAND.bcs as override and WTASIGHT.bcs as race script. Sebastian has FHLSEB.bcs as override, SHOUT06.bcs as race and WTASIGHT.bcs as general. However, once they join the party, the class script changes to DEFAULT.bcs and the default script changes to dplayer2.bcs. How can I get round this?
Would you give a guy a foot massage? If so, maybe you'd like Nathaniel.

What's a little falsehood between friends? The mysteries of The Luxley Family are soon to be unravelled.

Offline Lu

  • Planewalker
  • *****
  • Posts: 750
  • Gender: Female
Re: NPC pair's parting dialogue
« Reply #6 on: October 20, 2005, 09:45:38 PM »
To Miss Sakaki:

   It's very easy. For example, you can change the block in Andrei's script (the one in your first post) to

IF
  Global("FHLKicked","GLOBAL",1)
  InParty(Myself)
THEN
  RESPONSE #100
    LeaveParty()
    SetLeavePartyDialogFile()
    ChangeAIScript("",DEFAULT)
    MoveGlobal("AR0700","FHLAND",[2169.2452])
END
  (just make sure that Andrei's LeavePartyDialogFile .DLG file is OK)

   But as I have said before, it's only one of several possible solutions

Offline Lu

  • Planewalker
  • *****
  • Posts: 750
  • Gender: Female
Re: NPC pair's parting dialogue
« Reply #7 on: October 20, 2005, 09:53:23 PM »
   BTW, I think you should use MoveBetweenAreas() action instead of MoveGlobal()

Offline Miss Sakaki

  • Planewalker
  • *****
  • Posts: 62
  • Gender: Female
Re: NPC pair's parting dialogue
« Reply #8 on: October 21, 2005, 06:56:38 AM »
It now works perfectly. Thanks for the help!
Would you give a guy a foot massage? If so, maybe you'd like Nathaniel.

What's a little falsehood between friends? The mysteries of The Luxley Family are soon to be unravelled.

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: NPC pair's parting dialogue
« Reply #9 on: October 21, 2005, 12:51:13 PM »
Oh yeah, I forgot about dplayer2.bcs.  The WTASight.bcs and SHOUT06.bcs won't stay on the .cre files once they join the party.  Only the script in the override slot stays with an NPC out, in, and out of the party.
Earn Money Sleeping.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: