Papyrus - Help for Dynamically Attaching Scripts tutorial

Post » Sun Nov 18, 2012 5:36 pm

Hi folks,

I'm pretty new to Skyrim modding (and modding in general) and I'm having some problems with the "Dynamically Attaching Scripts tutorial" on the CK wiki. I can't post links but the name of the page on the wiki is "Dynamically_Attaching_Scripts". I am specifically working on the second part of this tutorial, "Attaching scripts to objects".

Briefly, the final goal is to attach the same script on every tree in the game (a reaction to some 'OnHit" event on the tree), without having to do it manually. From what I understand, one need to create a list with every tree object in the game. Using X reference aliases corresponding to the X nearest trees, the script is attached to those trees.

The reference aliases are held in a quest (DASQuest) which is itself called every 5 seconds by another quest executing periodically (UpdateQuest).

I followed precisely all the steps, and can't get the whole thing to work. After some debug, I found that the quest holding the reference aliases (DASQuest) is not launched. It is supposed to be started from a script reacting to the OnUpdate event in UpdateQuest but the DASQuest.Start() call returns False which means the quest wasn't started.

I tried to play with the DASQuest properties (check / uncheck run once, start game enabled, etc.) without success. Maybe there is something wrong in the way DASQuest is configured, most of the options are defaults and the tutorial does not go into details apart from the aliases creation.

Thanks.
User avatar
Sandeep Khatkar
 
Posts: 3364
Joined: Wed Jul 18, 2007 11:02 am

Post » Sun Nov 18, 2012 2:22 pm

Are your aliases all flagged as Optional? If a non-optional Alias does not fill, then it sends an Abort call to the quest and it won't start.
User avatar
Charles Mckinna
 
Posts: 3511
Joined: Mon Nov 12, 2007 6:51 am

Post » Sun Nov 18, 2012 11:02 am

Thanks for your reply. I checked, all the aliases are set to Optional.

I was wondering if the way I define the Condition for finding the tree (The "Fill Type" for aliases) is correct. The tutorial seems to say that this is done in a textual way by typing this :

IsInList 'TreeList' == 1.00

As the CK rather displays a form, I chose the "IsInList" condition applied to the FormList:TreeList, "==" for Comparison and "1.0000" for Value. I left the other values unchecked (OR, Swap Subject and Target, Use Global). I also left Run On : Subject.

Thanks
User avatar
Vickey Martinez
 
Posts: 3455
Joined: Thu Apr 19, 2007 5:58 am


Return to V - Skyrim