Jump to content

Start playing a custom song when sneaking


reptile7383

Recommended Posts

I have a song that I want to start playing whenever I start sneaking. So far I'm been able to have it play the song when I enter combat while sneaking by setting a condition where you must by sneaking for the song in the "Music Track" area then adding the song to the MUSCombat playlist. Can anybody help me get it so that the song will start outside of combat? Do I have to make my own playlist, and if so how do I do that?
Link to comment
Share on other sites

Add your song file as a new MusicTrack (single track with NO conditions). For the "Finale" use a short silence wav file.

Create a new MusicType called "SneakMusic" (abrupt transition, cycle tracks, ducks current track, fade duration=2, ducking=100, priority=2) then add your MusicTrack to it.

Create a new MagicEffect of Archetype script. Add a small script to it (see script below). After adding the script to the MagicEffect, select the script and click the Properties button, then click AutoFill.

Create a new Ability and add the new MagicEffect to it. Double-click the MagicEffect and in the "Target Conditions" area add a new condition to check for "IsSneaking = True" run on Subject.

Give the new ability to your player.

 

Scriptname SneakMusicScript extends ActiveMagicEffect

MusicType Property SneakMusic auto	; Custom music

Event OnEffectStart(Actor akTarget, Actor akCaster)
SneakMusic.Add()
EndEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
SneakMusic.Remove()
EndEvent

Edited by steve40
Link to comment
Share on other sites

I just had this amusing thought that the sneak music you're adding might be the Pink Panther theme or maybe even Mission Impossible :biggrin: Edited by steve40
Link to comment
Share on other sites

I had a couple ideas about what music to add but I had not even thought about the pink panther theme. The could be fantastic. What actually got me thinking about this idea was the "Khajiit Like to Sneak" song by Miracle of Sound.

 

Thanks for the help and I'll see if I can get it working!

Link to comment
Share on other sites

I think I did everything like you said, but when I try to add the ability using 'player.addspell <ID>' it just tells me that it wasn't found and the script wasn't compiled. Any ideas about what I did wrong?

 

Update: I added the magic effect to another ability (Silence) and the effect worked perfectly so it must have done something wrong when making the ability.

Edited by reptile7383
Link to comment
Share on other sites

Ok, so the script works and does compile.

If you are trying to add the ability from the console and it says "not found", then I would think that the error is that you're typing in the wrong ID. If you type [help "name of the ability"] (with quotes) in the console, it should list your ability and the correct reference ID. You could then try adding it from the console using that ID.

Edited by steve40
Link to comment
Share on other sites

  • Recently Browsing   0 members

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