Aller au contenu

Photo

Trouble with OnGroupDeathBeginConversation()


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

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Here's the script:

____________________
/*
If the group of final escap guards, named "2023_final_escape_guards" is killed, change yeti back to
hostile and attack group.  Send message to PC.
*/
#include "ginc_group"
void main()
{
FloatingTextStringOnCreature("worked",GetFirstPC());
string sGroupName = "2023_final_escape_guards";
AssignCommand(GetObjectByTag("2023_tundra_yeti"),ClearAllActions(TRUE));
AssignCommand(GetFirstPC(),ClearAllActions(TRUE));
GroupOnDeathBeginConversation(sGroupName,"2023_tundra_yeti","2023_tundra_yeti_hostile");
}




The script fires at the right time. It compiles. It appears that the NPCs in the group have the proper group name (tested with another script in runtime).  But I can't get the convo to fire.  Any help would be greatly appreciated.

#2
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
I don't know of a reason off hand. Have you tried using GroupOnDeathExecuteCustomScript rather than GroupOnDeathBeginConversation? You can have the script start the conversation.

Regards

#3
Morbane

Morbane
  • Members
  • 1 883 messages
dont forget to to AssignCommand() for the conversation function - i think that forces the action queue to move up until the conv starts. it always helps to add that kind of 'force' to get something to fire properly.

#4
Dann-J

Dann-J
  • Members
  • 3 161 messages
Can a talker's conversation fire without the talkee being close? Or can a creature talk to itself if the conversation is only a one-line bark string?

There doesn't seem to be a variable in GroupOnDeathBeginConversation that specifies who the creature is actually talking to - so maybe Morbane's suggestion of an AssignCommand (using the PC as the target) might help.

You might still have a problem if the yeti is too far away to start a conversation though.

#5
kamal_

kamal_
  • Members
  • 5 259 messages
Would love to hear a bulletproof solution. I use this in PoE, and in one place (and only that place), it simply does not work. Same code as everywhere else.

#6
M. Rieder

M. Rieder
  • Members
  • 2 530 messages

Kaldor Silverwand wrote...

I don't know of a reason off hand. Have you tried using GroupOnDeathExecuteCustomScript rather than GroupOnDeathBeginConversation? You can have the script start the conversation.

Regards


I tried that as well.  No luck.

#7
M. Rieder

M. Rieder
  • Members
  • 2 530 messages

Morbane wrote...

dont forget to to AssignCommand() for the conversation function - i think that forces the action queue to move up until the conv starts. it always helps to add that kind of 'force' to get something to fire properly.


Did not try that.  Next time I will, thanks.

#8
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
In the OC when you first meet Khelgar there is a fight that uses a group. I suggest you look at that and compare what they do to what you are doing.

Regards

#9
M. Rieder

M. Rieder
  • Members
  • 2 530 messages

Kaldor Silverwand wrote...

In the OC when you first meet Khelgar there is a fight that uses a group. I suggest you look at that and compare what they do to what you are doing.

Regards


That is excellent advice!  Thanks.  I always forget to do things like that.