Larian Banner
Previous Thread
Next Thread
Print Thread
Show NPC Dialog in reference to the player lvl #667464
24/05/20 09:36 PM
24/05/20 09:36 PM
Joined: May 2020
Posts: 1
Igrosky Offline OP
stranger
Igrosky  Offline OP
stranger

Joined: May 2020
Posts: 1
Hi !!

I am trying to make some special dialog with a npc and add some question that are only show to the player if this one is at a precise lvl.

Exemple :

If the player is lvl 5 the NPC show him a new answer in addition to the other one.

Can someone help me to make such a thing ?

Thanks !

Re: Show NPC Dialog in reference to the player lvl [Re: Igrosky] #671611
08/08/20 09:04 AM
08/08/20 09:04 AM
Joined: Mar 2016
Posts: 506
Belgium
T
Tinkerer Offline

addict
Tinkerer  Offline

addict
T

Joined: Mar 2016
Posts: 506
Belgium
You have to set a flag on the player when the dialog starts if the player has the desired level. The best place to do this is https://docs.larian.game/Osiris/Shared/Proc_DialogFlagSetup

So define that proc for your dialog with the number of speakers your dialog has (probably two: the NPC and the player) twice:
* in the first one, always clear the flag on the player indicating that they have the desired level (to get rid of potential left-overs from starting the dialog last time)
* in the second one, set the flag if the player has the desired level (use https://docs.larian.game/Osiris/API/CharacterGetLevel on the second speaker to check this)


Moderated by  Larian_Koala 

Powered by UBB.threads™ PHP Forum Software 7.6.2