Jump to content

Help with a trainer script


Macgyver1958

Recommended Posts

I'm trying to make a NPC that is capable of training you in more than one skill. For this example, we'll call him "SwordTrainer" who can train you in both one and two handed weapons. I've added him to both JobTrainerOnehanedFaction and JobTrainerTwohandedFaction. I created a dialogue for him that gives both options "Can you train me in Two handed Weapons?" and "Can you train me in One Handed Weapons." The script that is activated with these responses is:

 

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment

;NEXT FRAGMENT INDEX 1

Scriptname TIF__000E3A47 Extends TopicInfo Hidden

 

;BEGIN FRAGMENT Fragment_0

Function Fragment_0(ObjectReference akSpeakerRef)

Actor akSpeaker = akSpeakerRef as Actor

;BEGIN CODE

Game.ShowTrainingMenu(akSpeaker)

;END CODE

EndFunction

;END FRAGMENT

 

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

 

 

I'm super new to scripting, so I'm trying to figure out where the script gets it's information on what skill training menu to display. I'm assuming it's from the "class" of the character. I'm wondering if it's possible to modify the script and specify a specific training menu....like "Game.ShowTrainingMenu(OneHandedMaster).

 

Any help would be appreciated.

Edited by Macgyver1958
Link to comment
Share on other sites

I'm not really sure, I'm just learning Papyrus. The problem is the only resource on it is the Creationkit.com site. Unfortunately, it was written by a programmer, and not a technical writer. While I'm sure the author thought it made perfect sense, It's quite confusing to a non-programmer. In many cases the author just assumes you already know about something, and doesn't bother to explain each detail...and if there's a part you don't understand, you're screwed. Hopefully someone else in the near future will come out with a scripting tutorial that brings things down to level the audience (gamers) can understand.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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