XEscaflowneX Posted February 22, 2013 Share Posted February 22, 2013 (edited) Edit: The title is supposed to say "at end of dialogue line". I'm new to modding skyrim and papyrus but what I want to do seems very simple yet I can't get it to work. I have a new quest with some dialogue and at the end of one of the responses from the NPC I want a script to cast a custom spell (which only opens a message box) on myself. Because I want it to cast the spell as the npc finishes talking I tried to write the script into the middle box at the bottom of the topic info window with the title "End:". spell.cast(ObjectReference akSource, ObjectReference akTarget) What do I have to fill into the collums if I want myself to cast the spell either without target or on myself? And I think replacing "spell" with the spell ID isnt enough right? Do I have to create a property or variable or anything? Edited February 22, 2013 by XEscaflowneX Link to comment Share on other sites More sharing options...
EnaiSiaion Posted February 22, 2013 Share Posted February 22, 2013 You need to create a property for your spell. But Papyrus options in dialogue are very limited, so the best solution is probably to make a quest stage containing a function that casts the spell and then just move the quest from your dialogue. Try MySpell.Cast(Game.GetPlayer()) in a quest stage (add the property MySpell and set it to your spell - you'll need to create the property using the Property window before typing the cast command or you can't compile it). In your dialogue you'd then put something like GetOwningQuest().SetStage(999) for your new stage. If you don't enter anything in the log field or the objectives, the player won't notice. Link to comment Share on other sites More sharing options...
XEscaflowneX Posted February 22, 2013 Author Share Posted February 22, 2013 (edited) Thanks for the tip. In the Quest window I went to the script tab and added a new script with a property linking to the spell. For example I called the property SpellTest and it links to the spell with the ID _SpellTest now I have this line in the script : SPELL Property SpellTest Auto Now when I add the line you recommended like this: SpellTest.Cast(Game.GetPlayer()) I get this error when trying to save : "no viable alternative at input '.'" And in the Quest Stage tab the Papyrus Fragment tab is greyed out even when I have a stage selected. Edited February 22, 2013 by XEscaflowneX Link to comment Share on other sites More sharing options...
EnaiSiaion Posted February 22, 2013 Share Posted February 22, 2013 Where are you adding it? You're not supposed to see properties in quest fragment scripts unless you go over to Scripts and edit them the hard way, which is not what you should do. Link to comment Share on other sites More sharing options...
XEscaflowneX Posted February 22, 2013 Author Share Posted February 22, 2013 Well, where am I supposed to add it? The Papyrus Fragment box is greyed out in the Quest stage tab. So I tried going over to the Script tab. Link to comment Share on other sites More sharing options...
EnaiSiaion Posted February 22, 2013 Share Posted February 22, 2013 Save quest, open quest again. Link to comment Share on other sites More sharing options...
XEscaflowneX Posted February 22, 2013 Author Share Posted February 22, 2013 Alright this part is working now but when I click the properties button under the text box nothing happens. And I cant compile it either without doing the property first. Link to comment Share on other sites More sharing options...
EnaiSiaion Posted February 22, 2013 Share Posted February 22, 2013 Save quest, open quest again. ;) Link to comment Share on other sites More sharing options...
XEscaflowneX Posted February 22, 2013 Author Share Posted February 22, 2013 Now when I click properties I get a warning saying: SCRIPTS: Cannot open store for class "QF_questname_ and some random numbers", missing file? Link to comment Share on other sites More sharing options...
EnaiSiaion Posted February 22, 2013 Share Posted February 22, 2013 Hmmm. Did you modify that script in any other way than through that screen? Link to comment Share on other sites More sharing options...
Recommended Posts