Tasheni Posted March 19, 2017 Share Posted March 19, 2017 (edited) Edit: Solved. Look at last entries. Looked the whole day about this perk entry thing. I have come so far now:I have my horse that I can talk to, created a perk that's given to the player, created the perk entry point activation with a menu entry to chose either ride or talk to the horse. But this entry point needs a script that tells the Talk entry to make the dialog show up, when activated. I have no idea, how to do this.The dialog is attached to a quest, that is start enabled. It works, if I've mounted the horse. But I want to show this up, when I chose the Talk option.Has anybody an idea, what to put in this script to get this working? Sorry, I'm not good enough with scripting to do it myself. Any help is very much appreciated.Greetings, Tasheni Edited March 29, 2017 by Tasheni Link to comment Share on other sites More sharing options...
Tasheni Posted March 20, 2017 Author Share Posted March 20, 2017 So my head is aching with all this stuff of perk entry points and my conclusion is, that there's no way to trigger dialog with the activation menu. But when I come to think of it, there is perhaps a simple soulution for my goal:The ride horse activator only shows up, if the actor has a keyword = ActorTypeHorse. If I simply remove the keyword from the actor and add ActorTypeNPC, he should talk to me like every other companion. This script is very simple and could be triggered via dialog or other action - I have to try out. At the end of the dialog there has the script to add the ActorTypeHorse keyword again - the riding activator should show up again.Unfortunately I can't try it right now - have to work - hmmpff. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 20, 2017 Share Posted March 20, 2017 There is the function AllowPCDialogue which is suppose to allow any actor to talk with the player irregardless of race settings. You may only need to turn this on and off as needed. Do not know for sure, but it is worth testing out. Link to comment Share on other sites More sharing options...
Tasheni Posted March 20, 2017 Author Share Posted March 20, 2017 Hi Ishara, thank you for answering.No, that's not the solution. AllowPCDialog is set and I have no problems with the dialog itself, but with the time, the dialog shows up. It is the ride-activator, that hinders me to talk to the horse without mounting. If I set the AllowPCDialog to null, the horse can't talk anymore, but the ride activator still shows up. And this activator is somehow attached to the ActorTypeHorse keyword. I could start the quest for talking to the horse via script attached to the entry point activation and put in this the function to remove the keyword. I have no idea, if this will work. I try out and post, what issues will happen :) Link to comment Share on other sites More sharing options...
ReDragon2013 Posted March 20, 2017 Share Posted March 20, 2017 No idea whether next script is what you want, but maybe it is useful for you and could be an entry. Tasheni_HorseActivatorSCRIPT Scriptname Tasheni_HorseActivatorSCRIPT extends Actor {written by ReDragon 2017} ; https://forums.nexusmods.com/index.php?/topic/5464827-perk-entry-point-needs-a-script-but-what-to-put-in/ ; template is the script "MannequinActivatorSCRIPT.psc" Quest PROPERTY myQuest auto ; the quest you have created {your talking quest} Keyword PROPERTY ActorTypeHorse auto ; use autofill Keyword PROPERTY ActorTypeNPC auto ; use autofill Message PROPERTY HorseActivateMESSAGE auto ; make a clone of "MannequinActivateMESSAGE" FormID 0x000D7511 {Msg that appears upon activating your horse} ; change the button text like that: ; Button0: "Talking" ; Button1: "Riding" ; Button2: "Cancel" ; -- EVENTs -- 3 EVENT OnCellLoad() self.BlockActivation(TRUE) ; maybe useful ENDEVENT EVENT OnUnLoad() self.BlockActivation(False) ; maybe useful ENDEVENT EVENT OnActivate(ObjectReference actionRef) IF (actionRef == Game.GetPlayer() as ObjectReference) ELSE RETURN ; - STOP - / -2 not the player ENDIF ;--------------------- IF (actionRef as Actor).IsSneaking() Debug.Notification("HorseActivator: Sneaking not allowed!") RETURN ; - STOP - / -1 ENDIF ;--------------------- int i = HorseActivateMESSAGE.Show() IF (i == 0) ;Trace("DARYL - " + self + " Player chose to Place Armor") myF_Talking() RETURN ; - STOP - /0 talking with horse ENDIF ;--------------------- IF (i == 1) ;Trace("DARYL - " + self + " Player chose to Pose the Mannequin") myF_Riding() RETURN ; - STOP - /1 riding the horse ENDIF ;--------------------- IF (i == 2) ;Trace("DARYL - " + self + " Player chose to do nothing") RETURN ; - STOP - /2 do nothing ENDIF ;--------------------- Debug.Notification("HorseActivator: Unexpected button!") ENDEVENT ; -- FUNCTIONs -- 2 ;--------------------- FUNCTION myF_Talking() ;--------------------- Tasheni_QuestScript ps = myQuest as Tasheni_QuestScript IF ( ps ) ps.RunDialog() ELSE Debug.Notification("QuestScript not found") ENDIF ; ****************************** or simply use a quest stage myQuest.setStage(10) ; let us talk ENDFUNCTION ;-------------------- FUNCTION myF_Riding() ;-------------------- ; *** You cannot remove/add a keyword by scripts! *** ; next is working only, but for what IF self.HasKeyword(ActorTypeHorse) Debug.Notification("I am the horse..") ENDIF ENDFUNCTION Tasheni_QuestScript depends on your choice you need it too Scriptname Tasheni_QuestScript extends Quest FUNCTION RunDialog() ;------------------- setStage(10) ; let us talk ENDFUNCTION Link to comment Share on other sites More sharing options...
Tasheni Posted March 20, 2017 Author Share Posted March 20, 2017 Thank you, ReDragon2013, I will have a look at it, and also at this mannequin script. *** You cannot remove/add a keyword by scripts! ***So this is only in Fallout available? I found the function at the ck wiki. Alright, I will be busy now and try. Happy modding. Link to comment Share on other sites More sharing options...
Tasheni Posted March 20, 2017 Author Share Posted March 20, 2017 Okay, I tried it out and have problems, because I'm a scripting noob.I attached this script to the Perk Entry. It runs to that point: Tasheni_QuestScript ps = myQuest as Tasheni_QuestScript Error message is:cannot convert to unknown type Tasheni_QuestScriptcannot cast a quest to a Tasheni_QuestScript, types are incompatibleTasheni_QuestScript is not a known user-defined type. I've no idea, which type it has to be ...Uh, after checking again I see that the script extends actor. That can't work with perk. Okay, I attached it now to the actor directly, the error is the same. I deleted this line and replaced ps with myQuest. Now the message is:RunDialog is not a function or does not exist. Could you please again take a look at it?Thank you very much for your time. Link to comment Share on other sites More sharing options...
ReDragon2013 Posted March 20, 2017 Share Posted March 20, 2017 (edited) Scriptname Tasheni_QuestScript extends Quest FUNCTION RunDialog() ;------------------- setStage(10) ; let us talk ENDFUNCTIONYour problem is the function below, because you forgot to create a script file called as "Tasheni_QuestScript.psc".This quest source script (see content above) has to be in subfolder ../data/scripts/source of your Skyrim installation. After that you can complie the actor script (inside CK) without any error. ;--------------------- FUNCTION myF_Talking() ;--------------------- Tasheni_QuestScript ps = myQuest as Tasheni_QuestScript IF ( ps ) ps.RunDialog() ELSE Debug.Notification("QuestScript not found") ENDIF ; ****************************** or simply use a quest stage myQuest.setStage(10) ; let us talk ENDFUNCTIONyou can simply use setStage(10) like that, without the additional quest script: ;--------------------- FUNCTION myF_Talking() ;--------------------- ; or simply use a quest stage myQuest.setStage(10) ; let us talk ENDFUNCTIONor you have to create the additional quest script, attach the script to your quest and run this code inside the actor script. ;--------------------- FUNCTION myF_Talking() ;--------------------- Tasheni_QuestScript ps = myQuest as Tasheni_QuestScript IF ( ps ) ps.RunDialog() ELSE Debug.Notification("QuestScript not found") ENDIF ENDFUNCTION Edited March 20, 2017 by ReDragon2013 Link to comment Share on other sites More sharing options...
ReDragon2013 Posted March 20, 2017 Share Posted March 20, 2017 (edited) SetStage(10) is only a sample. You have to edit your quest, so it will trigger the horse dialog, if quest stage 10 was set (you can take any other stage). Make sure the quest is able to run more than once.After the dialog finished you should stop the quest and start it again to make next dialog possible by using setStage(). It is an attempt, no matter it works for you or not. You wrote earlier: "The dialog is attached to a quest, that is start enabled. It works, if I've mounted the horse. But I want to show this up, when I chose the Talk option." Cheers Edited March 20, 2017 by ReDragon2013 Link to comment Share on other sites More sharing options...
Tasheni Posted March 21, 2017 Author Share Posted March 21, 2017 Uh, I'm so blind. I'Ve copied your code into a text file for looking closer at it and overlooked the questscript after that, when I copied it into ck. This should work now. I will test it after I've finished the map markers for my companions. Thank you so much. Greetings, Tasheni Link to comment Share on other sites More sharing options...
Recommended Posts