steve40 Posted November 16, 2012 Share Posted November 16, 2012 (edited) Here you need the OnDeath event so the script should extend Actor and then cast the Actor to an ObjectReference to play the sound. Not necessary, you can also play sounds on Actors no problem, because the Actor script extends ObjectReference script, you see. Edited November 16, 2012 by steve40 Link to comment Share on other sites More sharing options...
steve40 Posted November 16, 2012 Share Posted November 16, 2012 Thats great thanks. But now do you know how i can get the death cam to wait long enough for Dagoth Ur to finish his speech before the game auto loads the last save??No. For some reason the script does not work when created via the alias method only when the script is attached to the player actor does it work. I will just have to leave a note in my mod description telling to delete the script when u uninstall the mod. just trying to figure out this deathcam issue now.It's not about deleting the script. Its that any object in the game that has a script assigned and then has that script removed will continue to try to run that script even if the script is no longer present. Of course now you've got me curious as to why the script won't work on the player alias. Care to post the script and I'll see what I can do? I'll have to substitute the boss actor of course and replace the sound with something else, but it would still be useful for developing something that would work on the player alias... It's also that if you put a script directly on the player, it will likely conflict with every other mod that tries to put a script directly on the player. Also, you should never put loose scripts in your mod. Pack them in a bsa. That way they will not hang around to torment the user long after he has uninstalled your mod :) Link to comment Share on other sites More sharing options...
steve40 Posted November 16, 2012 Share Posted November 16, 2012 (edited) For some reason the script does not work when created via the alias method only when the script is attached to the player actor does it work. You've missed something when setting up the quest alias. Maybe you didn't tick "Start Game Enabled" or something. Probably you shouldn't tick "Run Once" btw. Maybe you forgot to set the properties on the script? Edited November 16, 2012 by steve40 Link to comment Share on other sites More sharing options...
Ez0n3 Posted November 16, 2012 Share Posted November 16, 2012 Here you need the OnDeath event so the script should extend Actor and then cast the Actor to an ObjectReference to play the sound. Not necessary, you can also play sounds on Actors no problem, because the Actor script extends ObjectReference script, you see.Doh! :P Well, it doesn't hurt it, but noted :) Link to comment Share on other sites More sharing options...
morrowind1979 Posted November 16, 2012 Author Share Posted November 16, 2012 (edited) Thats great thanks. But now do you know how i can get the death cam to wait long enough for Dagoth Ur to finish his speech before the game auto loads the last save??No. For some reason the script does not work when created via the alias method only when the script is attached to the player actor does it work. I will just have to leave a note in my mod description telling to delete the script when u uninstall the mod. just trying to figure out this deathcam issue now.It's not about deleting the script. Its that any object in the game that has a script assigned and then has that script removed will continue to try to run that script even if the script is no longer present. Of course now you've got me curious as to why the script won't work on the player alias. Care to post the script and I'll see what I can do? I'll have to substitute the boss actor of course and replace the sound with something else, but it would still be useful for developing something that would work on the player alias... Yeah sure if you want to see for yourself how the alais does not work you can tets it on my mod: http://skyrim.nexusmods.com/mods/26465Although I think the script attached to the player should be OK. Tested in game after uninstalling my mod and all was fine. Also loaded only skyrim.esm in Creation Kit and without my mod checked the script was no longer present in the player actor. But here is the script anyway: Scriptname DagothVictory extends ObjectReference Sound Property UrVictory Auto Actor Property DUr Auto Event OnDeath(Actor akKiller) If (akKiller == DUr) UrVictory.Play(self) EndIf EndEvent Edited November 16, 2012 by morrowind1979 Link to comment Share on other sites More sharing options...
morrowind1979 Posted November 16, 2012 Author Share Posted November 16, 2012 (edited) For some reason the script does not work when created via the alias method only when the script is attached to the player actor does it work. You've missed something when setting up the quest alias. Maybe you didn't tick "Start Game Enabled" or something. Probably you shouldn't tick "Run Once" btw. Maybe you forgot to set the properties on the script? Everythings fine with the alais. Really no reason why it shouldnt be working but lo and behold it dosen't lol. I have no idea how to pack my mos into bsa format lol. Also when I am saving the scripts to my mod do I need to save the source scripts as well or just the .pex ones as I have been saving both to the mod. Just had a thought. My mod uses a .seq file. Would I have to create a new .seq file to make the player alais script work properly as it is attached to a blank quest???? Edited November 16, 2012 by morrowind1979 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 16, 2012 Share Posted November 16, 2012 How to create a BSA file...Load mod in the Creation KitEnsure that all files are properly placed in YOUR data directoryOpen the Files dropdown menu and select Create ArchiveA new box opensIn this box all your loose files should be listedIf everything is listed then click pack filesIn the box that pops up, give it the same name as your mod and press OKLocate your new BSA file in the Skyrim directoryMove it to the Data directoryMove your loose resources to a workspace directory setupTest your mod to ensure everything works properly with only the BSA as source of file information Link to comment Share on other sites More sharing options...
Recommended Posts