RomanR Posted April 25, 2023 Share Posted April 25, 2023 (edited) Spellgiven was ment as global or quest variable as comment said, that's why it isn't defined in a script. If you want it local, just define it as short in that script. Otherwise global variables can be defined under "Gameplay->Globals..." menu, if you haven't some quest available. If you have, just define it in its quest script and access it through "{Editor ID of said quest}.spellgiven". Edited April 25, 2023 by RomanR Link to comment Share on other sites More sharing options...
BlueSteelRanger Posted April 26, 2023 Author Share Posted April 26, 2023 Ohhh, I get ya. Hmm. I'm still reading up, learning. I do plan on having some quests in this monster I'm making. At least two quests and a worldspace. Link to comment Share on other sites More sharing options...
BlueSteelRanger Posted April 26, 2023 Author Share Posted April 26, 2023 (edited) Update: I'm sad to report that the attempted Teleport tome crashed my game. I fear I may have to remove it altogether. I should note that I tried DoOnce and I tried replacing "Spellgiven" with "addspell". The CS didn't throw any errors at me, and my load order (LOOT and Wrye Bash) didn't seem to detect anything untoward. However, when I tested in-game, the books crashed me out. I've reverted my working three back to the scripts I started with -- they're good.Example: One of my successful three Spell Tomes is "Field Medic". Its script looks like this. scn BSRFieldMedicSpellTomeSCRIPTshort doOncebegin onactivateif doOnce == 0ActivateMessage "Medic! Medic on the field! You'll be fine, Cadet."playsound SPLRestorationCastplayer.addspell BSRFieldMedicset doOnce to 1endifend Another unexpected update: Y'ALL! Y'ALL! IT WORKED! THE TELEPORT SPELL WORKED! I accidentally took out another spell of mine (but I can put it back in easily. And it's just a semi-cheaty "Keep you alive with ridiculous health" thing).I reverted back to a very short script I had originally used and moved it from a BOOK to a NOTE/SCROLL-type thing. A "letter", essentially. And it worked! No crashes, no bugs, no freezes! Here is the Teleport Spell script:ScriptName BSRGoinHomeSplScriptBegin ScriptEffectStart MessageBox "Get me out of here, I can't take any more!"EndBegin GameMode player.MoveTo BSRTakeMeHomeRef playSound SPLMysticismCastEnd Here is the script I put on a NOTE instead of a full BOOK:scn BSRRescueMeTeleportTomeScriptshort doOncebegin onactivateif doOnce == 0ActivateMessage "Get me out of here, I can't take any more!"playsound SPLRestorationCastplayer.addspell BSRGoinHomeset doOnce to 1endifend Edited April 26, 2023 by BlueSteelRanger Link to comment Share on other sites More sharing options...
Recommended Posts