Jump to content

Scripting Help Again lol


morrowind1979

Recommended Posts

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 by steve40
Link to comment
Share on other sites

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

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 by steve40
Link to comment
Share on other sites

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

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/26465

Although 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 by morrowind1979
Link to comment
Share on other sites

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 by morrowind1979
Link to comment
Share on other sites

How to create a BSA file...

  • Load mod in the Creation Kit
  • Ensure that all files are properly placed in YOUR data directory
  • Open the Files dropdown menu and select Create Archive
  • A new box opens
  • In this box all your loose files should be listed
  • If everything is listed then click pack files
  • In the box that pops up, give it the same name as your mod and press OK
  • Locate your new BSA file in the Skyrim directory
  • Move it to the Data directory
  • Move your loose resources to a workspace directory setup
  • Test your mod to ensure everything works properly with only the BSA as source of file information

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...