Jump to content

Recommended Posts

Posted (edited)

Is it possible to use player name as condition? For example "if player character's name is "XXXXX" then dialogue option is available".

 

If yes, then how?

Edited by TairaNoritsune
Posted

Took a look at it, it seems it is only usable when writing scripts, but can't add a condition to dialogue option in conversation with NPC. Does anyone have any idea how to do that (I mean block off or enable a conversation branch based on whether player character has a particular name or not)?

Posted (edited)

There isn't a condition function to check for the player's actual name.

 

I believe an alternative is to check for the PlayerKeyword via HasKeyword. The player is the ONLY reference that will have that keyword. If you really require name checking, I'm afraid SKSE is all there is for it.

Edited by Rasikko
Posted

I see.

 

Wish there was any better way to make things check if player character is this particular player character, or just random player character.

 

My goal is to make it possible for NPC to "recognize" a player character as specific character and I was thinking, the name would be the best way doable (since there is no way to take into account player character's appearance or anything). Another way to do it, I guess, would be to make a pop-up menu appear asking "Are you this person?" or something like that, store it to variable and use on condition, but I would want to avoid that, because it would not be subtle enough.

My goal was to use player character's name as a "password" of sorts, so that if player character would bear a specific name, NPC would recognize him and dialogue would be different than usual.

Posted

Well, found a way to go about it with function Thou suggested: made quest to have 2 stages - stage 0 executes script: if player character's name is "XXXX" start stage 20, if not stage 25 and stages have different dialogue.

Posted

An alternative that might give you a bit more freedom in usage:

Using SKSE have a quest with an alias pointing to the player. Assign a script to this alias. Register for the chargen menu and / or tween menu. Using the OnMenuClose event check the player's name. If the correct name, assign a global variable to a specific value. Otherwise give that global variable a value of zero. Then you can use the global variable in any condition statement whether it be an IF block of a script or a condition block for such things as dialog, spells, etc..

 

Sample script

 

  Reveal hidden contents

  • Recently Browsing   0 members

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