dewdropcat Posted November 11, 2017 Author Share Posted November 11, 2017 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 More sharing options...
dewdropcat Posted November 12, 2017 Author Share Posted November 12, 2017 Bumping the thread because I still need help :) Link to comment Share on other sites More sharing options...
foamyesque Posted November 12, 2017 Share Posted November 12, 2017 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 More sharing options...
dewdropcat Posted November 13, 2017 Author Share Posted November 13, 2017 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 More sharing options...
FrankFamily Posted November 13, 2017 Share Posted November 13, 2017 Here you have lots of pictures: https://www.creationkit.com/index.php?title=Bethesda_Tutorial_Papyrus_Introduction_to_Properties_and_Functions Link to comment Share on other sites More sharing options...
greyday01 Posted November 13, 2017 Share Posted November 13, 2017 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 More sharing options...
dewdropcat Posted November 15, 2017 Author Share Posted November 15, 2017 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 AutoEvent 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 endwhileEndEvent 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 More sharing options...
FrankFamily Posted November 15, 2017 Share Posted November 15, 2017 You need to cast the form you get from GetAt I believe, as in: Spell testSpell = SpellList.GetAt(i) as Spell Link to comment Share on other sites More sharing options...
dewdropcat Posted November 15, 2017 Author Share Posted November 15, 2017 You need to cast the form you get from GetAt I believe, as in: Spell testSpell = SpellList.GetAt(i) as SpellIt compiled successfully but did not give me anything when I tested it in game. Link to comment Share on other sites More sharing options...
dewdropcat Posted November 15, 2017 Author Share Posted November 15, 2017 Bumping for relevance Link to comment Share on other sites More sharing options...
Recommended Posts