muilezel666 Posted February 13, 2011 Share Posted February 13, 2011 (edited) Alright, I thought it'd be pretty easy to add a looping idle sound to a piece of armor using the GECK but I didn't see any way to easily add one without using a script, and as I haven't done any scripting before I'm trying to just copy existing code over and hope for the best. This is what I've tried doing, feel free to laugh: I basically just want the sound to be enabled when I equip the armor and keep it looping, just like when you equip the Flamer and you hear the looping noise continually but unfortunately unlike Weapons I don't know how to add a sound the easy way. If I add a sound by using a Animation Enum Sound Template I can only hear the idle sound when walking, running or stealthing and it will overlap the sound all the time depending on how often you set the chance for the sound to play. Unfortunately I couldn't find any existing armor in the game with just idle sounds added to them either. Thanks in advance. Edited February 14, 2011 by muilezel666 Link to comment Share on other sites More sharing options...
muilezel666 Posted February 14, 2011 Author Share Posted February 14, 2011 (edited) So after digging some more into it I got the script working that adds a looping sound to the armor when equipped. However I tried using the command soundstop (which is not a command apparently) to stop the looping sound when the armor is unequipped. scn NEWArmorIdleScript int iEquipped begin OnEquip player playsound FOLNEWArmorIdle player.AddSpell NEWArmorIdleActual set iEquipped to 1end ;begin onUnequip player; soundstop FOLNEWArmorIdle; player.RemoveSpell NEWArmorIdleActual;end begin GameMode if iEquipped == 1 && Player.GetEquippedrId NEWArmorIdle == 0 player.RemoveSpell NEWArmorIdleActual set iEquipped to 0 endifend Apart from not knowing how to stop an actual sound from playing when you unequip the armor, I also do not know the command for it. Maybe I should use a non-looping soundfile and use a script command to make the sound loop instead, then use onUnequip command to stop the loop? Edited February 14, 2011 by muilezel666 Link to comment Share on other sites More sharing options...
Ekayne Posted June 24, 2016 Share Posted June 24, 2016 did you ever figure this out? Link to comment Share on other sites More sharing options...
Jokerine Posted June 24, 2016 Share Posted June 24, 2016 I managed to make sound "follow" the player when they equip armor ( a helmet), so to speak, through a timer quest in Boom to the Moon. The problem with sounds is that you can start them with PlaySound but there is no StopSound-kinda command, so you need to get creative with this. So, to give you an idea, when the player equips the helmet it starts a quest... (pls don't judge my scripts, I am not an expert) scn aaaMoonBreathEffectScript ;manages the breathing sound effect from the space helmet;added waterbreathing in v2, copied from vanilla rebreather scriptint iEquippedbegin OnEquip PlayerStartQuest aaaMoonBreathEffectQuest ;the timer quest that actually plays the sound startsiMod aaaMoonHelmetISFX ;blurry vision is onplayer.AddSpell VMS15WaterBreathingActual ;v2 only - add waterbreathing effect from rebreatherset iEquipped to 1 ;int to check that player now has waterbreathingendbegin OnUnequip PlayerStopQuest aaaMoonBreathEffectQuest ;noisy quest is stoppedriMod aaaMoonHelmetISFX ;blurry vision is offendbegin GameMode if iEquipped == 1 && Player.GetEquipped aaaMoonSpaceSuitHelmet == 0 ;if the player does not have the helmet... player.RemoveSpell VMS15WaterBreathingActual ;disable waterbreathing set iEquipped to 0 endifend And the quest has this script attached to it. scn aaaMoonBreathQuestScript ; Quest that handles the sound effect from the fishbowl helmet. A repeating timer because there is no way to stop a looping sound; (such as when the player removes the helmet - using PlaySound would play it forever even when the helmet is off). So the sound; does not loop - the timer plays it every two seconds instead.Float TimerBegin Gamemode;;;;;;;;;; when timer is counting...if Player.GetInWorldspace aaaMoon && (Timer <2) ; for some reason I set it to run on the new worldspace only. Can't remember why right now, butset timer to timer + GetSecondsPassed ; it will happen on Earth too. Feature, not a bug! I made this script like, half a year ago... if it ain't broke...Else ;;;;;;; once timer counts to 2...playsound aaaMoonBreathSoundFX ; play breath soundSet timer to 0 ; restart timerEndifEnd So, to get back to your question, you'd probably have to make a quest with a GameMode script to check if your weather is on, and if so, add rads to the player and play the ticking sound from the geiger counter. I think that one loops by default so you'd have to make a copy of it in the GECK and untick the looping checkbox :smile: Link to comment Share on other sites More sharing options...
Recommended Posts