Maleagant Posted April 2, 2012 Share Posted April 2, 2012 (edited) So, I am designing and creating a full on expansion for one of the factions of Skyrim, (Sorry no spoilers here :P) However.... I am continually running into issues with papyrus..... Mainly being that I know there are ways to do things script wise and yet I can not seem to find the exact commands I need for the scripts. IE: Scenario: Your character, decides to make a choice in a quest, thus failing one objective and starting another, however when you make this choice the quest script should triger the NPC to do (something) such as cast a spell, with the condition that it only be cast if the (Objective) is failed. Problem: There is no actual condition besides IsObjectiveFailed, and this apparently is the "One" condition you can not set on a character as a condition when useing the preset methods. IE, you need to write out this script yourself. This.. is what I having issues with. What I need: A simple script that goes: If Objective(10) is Failed, This NPC (the NPC this script is placed on) will cast (referancedalias) spell imediately. IE: Function cast spell IsObjectiveFailed(10) = TrueCast (spell Referance) End event So I need the NPC to cast the spell right after dialog concludes if the player chooses to fail said objective. Any help would be appreciated. Thanks. Edited April 2, 2012 by Maleagant Link to comment Share on other sites More sharing options...
tunaisafish Posted April 2, 2012 Share Posted April 2, 2012 You can add a papyrus fragment to execute after the topic is complete.http://www.creationkit.com/Topic_Info_Fragments Link to comment Share on other sites More sharing options...
Maleagant Posted April 2, 2012 Author Share Posted April 2, 2012 As an added note to this, If someone could tell me how to make an NPC attack a player unprovoked, (IE, you argue with an NPC, the NPC gets Mad and ends Dialog then opens a whoopass on you. Thanks Link to comment Share on other sites More sharing options...
Maleagant Posted April 2, 2012 Author Share Posted April 2, 2012 You can add a papyrus fragment to execute after the topic is complete.http://www.creationkit.com/Topic_Info_Fragments Thanks, I tried the wiki site, there honestly isn't much there when you click on fragments (As is obvious by that page you linked) :( , I need an actual script with that command in it to look at so I can recreate it for different situations and NPCs. Those 2 things seem to be the only things the creation Kit wiki doesn't have on it (or at least that I could find in 4 days of reading the things). If someone could post a link I'd appreciate it. (the one you posted is a page with like 2 things on it, and neither are useful to me without a context to show how they are used in situations. I am not a professional Coder so when I see something like that, I know what it does sure, but not when and where and how to use it in combination with other scripts. For that I need to see an actual example of one that works.) Link to comment Share on other sites More sharing options...
fg109 Posted April 2, 2012 Share Posted April 2, 2012 To get an NPC to stop dialogue and attack you, just check 'Goodbye' on the topic. Then you put inakSpeaker.StartCombat(Game.GetPlayer())in the topic info fragment. As for making an NPC cast a spell, that's slightly more complicated. There are the papyrus functions Cast and RemoteCast, but neither of those will show a casting animation. What you would need to do is create a UseMagic AI package for your NPC. Set the condition for the package as some stage in your quest, and give it to the NPC (either by placing it directly on the base actor or by using a reference alias). Then when the objective is failed, set the stage in your quest that will trigger the package, and use EvaluatePackage on the NPC. Link to comment Share on other sites More sharing options...
etang2 Posted April 2, 2012 Share Posted April 2, 2012 God, i used to do hard core senario modding for AOC and believe me, the trigger tools for it were absolutely infuriating too say the least, simply not enough or their triggerings were inconsistant in occurance and buggy in excecution Link to comment Share on other sites More sharing options...
Recommended Posts