Jump to content

Skyrim Dialogue script Troubles


Guest Suited Prawns

Recommended Posts

Guest Suited Prawns

So what im trying to do is have one of two topics randomly chosen, the game dose supply a random option for responses but you can only use one Papyrus fragment for the lot of em. I tried the random int Function but I could not figure out how to a global variable to the generated int.

 

This is what im trying to do

 

 

                                           Option one (Sets global variable to 1) - Unlocks one type of interaction

                                         / 

TOPLEVEL --- Randomize 

                                         \ 

                                          Option two ( sets global variable to 2) - unlocks another type of interaction 

I apologize for being such a massive noob, but I usually keep my fingers of Dialogue and Quests.

 

Link to comment

Hello,

 

let me understand... You are trying to have a dialogue that is started by the player with one entry Topic, then you wish to have two possible outcomes that are based on a random percentage...

 

If this is your question then:

 

Create your main topic as branch entry point.

Then add TWO Topic Infos to it and add the two answers (responses). Then you can condition the first one with a condition like GetRandomPercentage < 50, so the first answer will be pick 50% of times, and the other the rest of times. The two topic info can have different fragments inside.

 

If you wish to calculate the percentage somewhere else you  have two options:

1) Global Variable

Define a Global Variable of type Int or Float, assign a value to it inside one script and then condition your topic info (created as before) with GetGlobalValue < 50 (or the value you wish)

I do not like using global variables.

 

2) Conditioned property

Define one of your scripts (usually the main one) as "Conditional", and then add a property to it like this:

Scriptname myWonderfulQuest extends Quest Conditional

int Property myRandomValue Auto Conditional

...

Then you can set the value of "myRandomValue" from any script by referring the script of your quest in another script.

And then you can condition the Tpic Info through: getVMQuestVariable (your quest myWonderfulQuest, ::var_myRandomValue) < 50

 

 

Hope this helps.

 

 

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use