Conversation Help

Admittedly, I’m a little embarrassed asking this question -

I’m trying my best to code something from a dialog node with no success. I’m creating an inn keeper and the necessary dialog that accompanies it.

I simply want when it becomes apparent that you don’t have enough gold for the room - that the conversation editor displays the next dialog node expressing the fact that you don’t have the gold for the room. I can’t get the next dialog node to display.
I’ve tried using the text appears tab with no success.
I really don’t have a lot of experience with the editor and any help would be greatly appreciated. :wink:

Code I was toying with on the text appears tab. I’m uncertain on how to correctly utilize the text appears tab in this instance.

int StartingConditional()
{
    object oPC = GetPCSpeaker();

    if ( GetGold(oPC) < 10 )
    return FALSE;

    return TRUE;
}

Edit: The conversation node is appearing now using the code for the text appears tab. I don’t understand why she is being docked 3 gold pieces when she didn’t even agree to buy the room. every time the code runs, she loses 3 gold pieces???
To be clear, the conversation displays the node saying that you don’t have enough gold, but takes 3 gold every time?
Nothing is working now. Text appears tab code isn’t displaying the - “You don’t have enough gold dialog node.”
Just need to know the procedure to display the not enogh gold dialog if you lack the currency.

What’s the name of the script selected in the Text appears when tab? And what’s the name of the script you showed us in your post?

Is there any script in the Action taken tab?

This is what is on the actions taken tab -

/::///////////////////////////////////////////////
//:: FileName rx_gold_10
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 7
//:://////////////////////////////////////////////
void main()
{

    // Remove some gold from the player
    if ( GetGold(GetPCSpeaker() ) < 10 ) return;

    TakeGoldFromCreature(10, GetPCSpeaker(), TRUE);

}

For the Text appears tab -


int StartingConditional()
{
object oPC = GetPCSpeaker();

if ( GetGold(oPC) < 10 )
return FALSE;

return TRUE;

}


The name of the script in the post is rx_gold_10

@Nizidramaniit

You need two response nodes …

The first one should be the one where the PC CAN afford, and you check for “can afford” and deduct any gold costs on the same node (via the action). Therefore, your condition check should be checking for having the gold rather than NOT having the gold. (Reverse your logic here.)

The second node that follows is called the “default” (that always comes at the end of any conditional nodes listed), which has no condition checks and should not have any gold removal. This is the “cannot afford” node, which likely has no action.

2 Likes

Thank you for taking the time to explain in detail how it works.
Got it working now.
Thanks again Lance

1 Like

The action take script is doing the following:
If pc has less than 10 gold, it takes 10 gold.
First of all you should change the < for a >.
As it is now as long as pc has less than 10gp it tries to take 10 but takes all pc has, that must be 3.

:+1: