phoneyLogic Posted March 27, 2016 Share Posted March 27, 2016 I didn't fully understand yet how effects work. Currently I'm trying to add an radiation effect to the player while he is in toxic weather. It should add RADs to the player and play the effect sound, like you would camp on contaminated grounds. Somehow, I'm doing it wrong. What would I need to do? Link to comment Share on other sites More sharing options...
RoyBatterian Posted March 28, 2016 Share Posted March 28, 2016 Hrm I don't think you can attach a sound to an actor effect. But you can apply the actor effect to the player while player is in toxic pretty easily, you can use a hidden perk for that purpose. For sound, well you could add a sound marker and have it follow the player around, but that needs to be scripted and the marker needs to be enabled/disabled in different frames. I had an idea to use an invisible eyebot with an idle sound to do it so you can bypass the scripting by setting it to a teammate with a follow package, I haven't tried it yet but it should work. Link to comment Share on other sites More sharing options...
Jokerine Posted March 28, 2016 Share Posted March 28, 2016 I managed to make sound "follow" the player, 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 script int iEquipped begin OnEquip Player StartQuest aaaMoonBreathEffectQuest ;the timer quest that actually plays the sound starts iMod aaaMoonHelmetISFX ;blurry vision is on player.AddSpell VMS15WaterBreathingActual ;v2 only - add waterbreathing effect from rebreather set iEquipped to 1 ;int to check that player now has waterbreathing end begin OnUnequip Player StopQuest aaaMoonBreathEffectQuest ;noisy quest is stopped riMod aaaMoonHelmetISFX ;blurry vision is off end begin 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 endif end 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 Timer Begin 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, but set 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 sound Set timer to 0 ; restart timer Endif End 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. But I'm pretty sure Nevada Skies has radstorms and radioactive rain, so you could just grab that mod and open it up in the GECK to check how it's done :) Link to comment Share on other sites More sharing options...
phoneyLogic Posted March 28, 2016 Author Share Posted March 28, 2016 (edited) Thank you for the hints. Tracking if the weather is active and quest is no problem and already implemented. I can give a go looking how others solve it. My problem is adding an effect by quests. I remember fiddling around with it years ago. I already did effects myself somewhere, but it has gone lost. Something I'm doing wrong or didn't understand the basics right (effect begin blocks, effect types or whatnot). Now I thought someone has a quick answer for my vague question, like 1., 2., 3... I do not need a detailed solution, just a few hint on the basics. I'll poke a bit around. Thanks for the input. :-) Edited March 28, 2016 by tortured Tomato Link to comment Share on other sites More sharing options...
Jokerine Posted March 28, 2016 Share Posted March 28, 2016 (edited) Your effect could be applied by quest like so: 1. Make a specific quest that will contain the effect scripting (the fake looping sound I mentioned in one of my scripts)2. Make another specific quest that will track if the weather is on, and if so, it will start the quest mentioned above and stop the quest when the weather changes. If you are having trouble I could take a look at your mod later on and see if I can put this in for you :smile: Edited March 28, 2016 by Jokerine Link to comment Share on other sites More sharing options...
phoneyLogic Posted March 28, 2016 Author Share Posted March 28, 2016 Okay, found out. I used the wrong Actor Effect type. Basic operations: 1. Creating a Base Effect. 2. Creating an Actor Effect. 3. Adding the Base Effect to the Actor Effect. 4. Creating a Quest script that adds or removes the effect to/from the player by using "Player.Addspel ActorEffect" and "Player.Dispel ActorEffect". Link to comment Share on other sites More sharing options...
Recommended Posts