Jump to content

[LE] Tome of the Master


dewdropcat

Recommended Posts

 

 

A much simpler piece of script would pull them from a formlist:

FormList Property SpellList Auto

Event OnRead()
    if !SpellList
        return
    endif

    Actor PlayerRef = Game.GetPlayer()
    if !PlayerRef
        return
    endif
        
    int i = SpellList.GetSize()
    while i > 0
        i-=1
        Spell testSpell = SpellList.GetAt(i)
        if testSpell
            PlayerRef.AddSpell(testSpell)
        endif
    endwhile
EndEvent

This way you only require one property, a formlist that contains every spell you want to add.

So, I'm new at coding. I tried to do a property but it didn't work when I tested it.

 

 

Okay, so to fill properties, there'll be a 'fill properties' button next to the script window. It will allow you to select any of the appropriate forms to fill into the property, which will then pass the information to the game when the script actually gets called.

 

I'm not seeing this "fill properties" Button. Can you take a picture of it please?

Link to comment
Share on other sites

 

 

 

A much simpler piece of script would pull them from a formlist:

FormList Property SpellList Auto

Event OnRead()
    if !SpellList
        return
    endif

    Actor PlayerRef = Game.GetPlayer()
    if !PlayerRef
        return
    endif
        
    int i = SpellList.GetSize()
    while i > 0
        i-=1
        Spell testSpell = SpellList.GetAt(i)
        if testSpell
            PlayerRef.AddSpell(testSpell)
        endif
    endwhile
EndEvent

This way you only require one property, a formlist that contains every spell you want to add.

So, I'm new at coding. I tried to do a property but it didn't work when I tested it.

 

 

Okay, so to fill properties, there'll be a 'fill properties' button next to the script window. It will allow you to select any of the appropriate forms to fill into the property, which will then pass the information to the game when the script actually gets called.

 

I'm not seeing this "fill properties" Button. Can you take a picture of it please?

 

 

Are you working in the CK? It's right next to the box that lists all the scripts the form has.

Link to comment
Share on other sites

 

 

 

 

A much simpler piece of script would pull them from a formlist:

FormList Property SpellList Auto

Event OnRead()
    if !SpellList
        return
    endif

    Actor PlayerRef = Game.GetPlayer()
    if !PlayerRef
        return
    endif
        
    int i = SpellList.GetSize()
    while i > 0
        i-=1
        Spell testSpell = SpellList.GetAt(i)
        if testSpell
            PlayerRef.AddSpell(testSpell)
        endif
    endwhile
EndEvent

This way you only require one property, a formlist that contains every spell you want to add.

So, I'm new at coding. I tried to do a property but it didn't work when I tested it.

 

 

Okay, so to fill properties, there'll be a 'fill properties' button next to the script window. It will allow you to select any of the appropriate forms to fill into the property, which will then pass the information to the game when the script actually gets called.

 

I'm not seeing this "fill properties" Button. Can you take a picture of it please?

 

 

Are you working in the CK? It's right next to the box that lists all the scripts the form has.

 

Again, can you take a picture of it to make sure I'm in the right place?

Link to comment
Share on other sites

Have you watched the video tutorials at creationkit.com. You can watch a script being made and it's properties filled.

Best in Slot has a tutorial showing basic scripting.

Antony Bellingham has a tutorial on basic scripting events.

Hellcat5 has a bunch of tutorials. Under Basics it has Adding properties to scripts.

Try watching those tutorials. They show you step by step how to make simple scripts.

While making your own stop the video at that stage and compare your screen to theirs

Link to comment
Share on other sites

I watched BestInSlot's scripting video and I am still not compiling correctly.

 

Current script

 

 

Scriptname MasterTome2 extends ObjectReference Conditional
{Gives the spells}

Int Property spellgiving Auto
{Giving the spell}

FormList Property SpellList Auto

Event OnActivate(ObjectReference akActionRef)
if !SpellList
return
endif

Actor PlayerRef = Game.GetPlayer()
if !PlayerRef
return
endif

int i = SpellList.GetSize()
while i > 0
i-=1
Spell testSpell = SpellList.GetAt(i)
if testSpell
PlayerRef.AddSpell(testSpell)
endif
endwhile
EndEvent

 

 

Here is the compile error

 

 

Starting 1 compile threads for 1 files...
Compiling "MasterTome2"...
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\MasterTome2.psc(22,14): type mismatch while assigning to a spell (cast missing or types unrelated)
No output generated for MasterTome2, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on MasterTome2

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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