Aller au contenu

Photo

Script to start conversation


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

#1
ShadowAvatar87

ShadowAvatar87
  • Members
  • 8 messages
Hi, I need a script that will initiate a conversation with a chosen NPC directly after a cutscene finishes. I figure I can use the end script area of the cutscene to fire it. I tried using the BeginConversation function, but I'm having trouble figuring it out. I'm pretty new to coding, so actually posting the script would be a big help.

Thanks

#2
AmstradHero

AmstradHero
  • Members
  • 1 239 messages
If you include "utility_h" in your script, you can use UT_Talk() instead.



The only mandatory parameters to that function are objects for the speaker and the listener.



So a simple GetObjectByTag() with your speaker's tag as a string should get your speaker.

Then use oPC as the player as the listener. (Or GetHero() if you haven't already defined oPC as GetHero() earlier in your script)

#3
ShadowAvatar87

ShadowAvatar87
  • Members
  • 8 messages
Thanks, I'll give it a try

#4
ShadowAvatar87

ShadowAvatar87
  • Members
  • 8 messages
That did the trick. Thanks a lot.