Jump to content

Recommended Posts

Posted

I have spent hours trawling theses forums and CreationKit.com and can't find what seems to be the most useful feature for mod creators...:

How to get your new Item/Spell straight into the Inventory/SpellBook.

 

I gathered that it may have something to do with making a Quest script - but failed to find any definitive answers.

 

Can anyone help?

 

 

Thanks!

Posted (edited)

I wish I could find the post I'm looking for so I can credit the awesome person I got this from...but its a wily, elusive thread :(

 

so here is the method I am using:

 

1.create a new Formlist and dump all the spells you want to be added to the player into it

 

2.create a new quest, check the boxes for "Start Game Enabled" and "Run Once", click over to the scripts tab

 

3.attach this script to that quest, ! be sure to set the properties correctly in the properties tab !

 

Scriptname yourscript extends Quest
;===============  PROPERTIES  ==========================================;
FormList Property yourlist auto
;===============  VARIABLES   ==========================================;
Spell SpellForm
Actor Player
;===============    EVENTS    ==========================================;
Event OnInit()
 int CurrentSpell = 0
 int FormListSize = yourlist.GetSize()
 Player = Game.GetPlayer()
 while ( CurrentSpell < FormListSize )
   SpellForm = yourlist.GetAt( CurrentSpell ) As Spell
   Player.AddSpell(SpellForm)
   CurrentSpell += 1
 endWhile
EndEvent 

 

this script will run once on game load and cycle through each spell in the formlist, until its added them all to the player

Edited by cscottydont
  • Recently Browsing   0 members

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