Taffer42 Posted October 15, 2018 Share Posted October 15, 2018 (edited) My head hurts. I'm trying to do something I think should be fairly easy, and google is just not helping at all. I'm trying to edit a script...I've added a few things in and they aren't working. Here's what's going on...I found a mod that removed your starting spells. I'm using it, but adding those starting spells in Helgen as spell tomes during your escape, so you can have them if you want them. I've added all 5 starting spell tomes (Healing, Flames, Fury, Sparks [actually already there], and Conjure Familiar). The last three I have starting as disabled, since not everyone starts with them. What I'm trying to do is have the game detect your race, and if your race normally starts with one of these spells, set the appropriate spell tome to enabled. Here's the code: Book property _myTest_SpellTomeCF auto Book property _myTest_SpellTomeFury auto Book property _myTest_SpellTomeSparks auto function appropriatelyNamedFunction() Race _myTest_PlayerRace = Game.GetPlayer().GetRace() if (_myTest_PlayerRace == "DarkElfRace" || _myTest_PlayerRace == "DarkElfRaceVampire") _myTest_SpellTomeSparks.Enable() elseif (_myTest_PlayerRace == "HighElfRace" || _myTest_PlayerRace == "HighElfRaceVampire") _myTest_SpellTomeFury.Enable() elseif (_myTest_PlayerRace == "BretonRace" || _myTest_PlayerRace == "BretonRaceVampire") _myTest_SpellTomeCF.Enable() endIf endFunction When I compile this, I get an error saying Enable is not a function or does not exist. I'm sure this is something easy and when I'm told what silly mistake I'm making I'm going to feel very foolish. But for right now, the dent in the wall from where I'm banging my head is getting just a little too big. :sad: Edited October 15, 2018 by Taffer42 Link to comment Share on other sites More sharing options...
Reneer Posted October 15, 2018 Share Posted October 15, 2018 You want those properties to be Objectreferences and not Books. Link to comment Share on other sites More sharing options...
Deleted3897072User Posted October 15, 2018 Share Posted October 15, 2018 Also, you are comparing a Race with a string. You can't do that. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted October 15, 2018 Share Posted October 15, 2018 In case you aren't sure how to do the two things suggested above that are needed to get your script working, take a look at this modification of your posted code. ObjectReference property _myTest_SpellTomeCF auto ;point to placed instance ObjectReference property _myTest_SpellTomeFury auto ;point to placed instance ObjectReferencd property _myTest_SpellTomeSparks auto ;point to placed instance Race Property DarkElfRace Auto Race Property DarkElfRaceVampire Auto Race Property HighElfRace Auto Race Property HighElfRaceVampire Auto Race Property BretonRace Auto Race Property BretonRaceVampire Auto function appropriatelyNamedFunction() Race _myTest_PlayerRace = Game.GetPlayer().GetRace() if (_myTest_PlayerRace == "DarkElfRace" || _myTest_PlayerRace == "DarkElfRaceVampire") _myTest_SpellTomeSparks.Enable() elseif (_myTest_PlayerRace == "HighElfRace" || _myTest_PlayerRace == "HighElfRaceVampire") _myTest_SpellTomeFury.Enable() elseif (_myTest_PlayerRace == "BretonRace" || _myTest_PlayerRace == "BretonRaceVampire") _myTest_SpellTomeCF.Enable() endIf endFunction Link to comment Share on other sites More sharing options...
Taffer42 Posted October 16, 2018 Author Share Posted October 16, 2018 That did it! Thank you all so much! So simple a thing to do, yet so sadly undocumented. Link to comment Share on other sites More sharing options...
Recommended Posts