StarboyCosmic Posted August 11, 2021 Share Posted August 11, 2021 Hi, so I am trying to figure out a way to make an equipped spell apply ghost visuals to the player. The spell is a flames type spell, and i want it to apply a ghost visual to your player character only when you have it equipped, then go back to normal when you unequip the spell. Can someone walk me through how to go about this? or point me to any tutorials or resources for learning how? I'm kinda assuming it has something to do with creating a custom "equip ability", but i'm not sure.. or Possibly related the magicSetActorAlphaScriptthanks Link to comment Share on other sites More sharing options...
Ghaunadaur Posted August 12, 2021 Share Posted August 12, 2021 One way to do this:Make a new quest and set it start game enabled. Then add a reference alias to quest, for fill type choose specific reference and pick PlayerRef. Add this script to the reference alias (give it a more unique name) Scriptname GhostScript extends ReferenceAlias Spell Property FlamesCustom auto EffectShader Property GhostFXShader auto Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) if (akBaseObject == FlamesCustom) GhostFXShader.Play(GetActorReference()) GetActorReference().SetAlpha(0.25) endif EndEvent Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference) if (akBaseObject == FlamesCustom) GhostFXShader.Stop(GetActorReference()) GetActorReference().SetAlpha(1.0) endif EndEvent After that, fill the properties. GhostFXShader is the ghost effect, just hit the auto-fill button to fill it. FlamesCustom would be your spell, you can rename it to the EditorID, so it will auto fill too. Link to comment Share on other sites More sharing options...
StarboyCosmic Posted August 13, 2021 Author Share Posted August 13, 2021 Thanks for the help. I am totally new to scripting and quests, so I'm not sure I did things correctly, but I tried to follow your instructions exactly, and this is where I'm at:(Screenshot of the CK)https://drive.google.com/file/d/1K3Pqrs_KD7A2CCiyPj--uTG7tcppoxXs/view?usp=sharing So I'm stuck here with the CK telling me the "extends script" doesn't exist. If you know what I'm missing, or did wrong, please let me know when you get a chance.Note: I didn't input anything else into the quest, besides what you instructed. Link to comment Share on other sites More sharing options...
Ghaunadaur Posted August 13, 2021 Share Posted August 13, 2021 (edited) The script should extend ReferenceAlias. Also, you copied the script code to the documentation field. That's just a description for the script, so you can leave that empty, and press OK to generate the script. Now you should have a blank script with just the header line. Right click on the script and select 'edit source' to open the editor. Copy the rest of the code and compile it. Edited August 13, 2021 by Ghaunadaur Link to comment Share on other sites More sharing options...
StarboyCosmic Posted August 13, 2021 Author Share Posted August 13, 2021 Hm, are you sure there isn't another step I'm missing? Because I tired putting "ReferenceAlias" into the extends field and still got the same error. Also tried again with my specific Alias name. https://drive.google.com/file/d/1jhFvP6Jg0UrZrwxF2DcY0U2u_k6VpnOR/view?usp=sharing Is there something else I'm supposed to do before it will work? Like on the Reference Alias page itself, or in the Quest page? Idk lol sorry for being a noob at this Link to comment Share on other sites More sharing options...
Ghaunadaur Posted August 13, 2021 Share Posted August 13, 2021 (edited) No worries, we'll get that fixed.If you're still getting the error, that means the CK can't find the script sources. In the Data folder there should be a Scripts.rar archive, which contains the source files. Extract all of it to the Data folder. Edited August 13, 2021 by Ghaunadaur Link to comment Share on other sites More sharing options...
StarboyCosmic Posted August 13, 2021 Author Share Posted August 13, 2021 Yea, via this thread https://forums.nexusmods.com/index.php?/topic/7370511-the-extends-script-does-not-exist/ I realized I had the files installed in the wrong location lolGot that sorted and now its working, thank you! :laugh: Link to comment Share on other sites More sharing options...
Ghaunadaur Posted August 14, 2021 Share Posted August 14, 2021 Glad you got it working. :smile: Link to comment Share on other sites More sharing options...
Recommended Posts