Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Sound


Tonycubed2
 Share

Recommended Posts

This script will play 10 different random spooky sounds in a graveyard. Remember to assign your sounds in Properties.


Scriptname TombsHaunted extends ObjectReference   


import sound 

import game 

import utility 

GlobalVariable property GameHour auto 

Float Property NoEarlierThan = 20.0 Auto   

Float Property NoLaterThan = 4.0 Auto   

int random 

int random1  

int random2  

int random3  

int random4  

int myNum  

int myLoop  

int timer 

int instanceID00 

ObjectReference property mySoundOrigin auto 





bool function IsTimeValid() 

        Float TT = GameHour.GetValue()    

                if TT > 13 

                        if TT >= NoEarlierThan 

                        return TRUE 

                       endif 

            elseif TT <=  NoLaterThan     

                        return TRUE 

                endif 

        Return FALSE 

endFunction 



Event OnTrigger(ObjectReference akActionRef) 

Debug.Notification("Triggered") 

        if (akActionRef == Game.GetPlayer())  

                if  IsTimeValid() 

                Debug.Notification("Time is Valid") 

Debug.Notification("timer is now: "+timer) 

if timer < 1 

timer = Utility.RandomInt(5, 25) 

Debug.Notification("timer initialize: "+timer) 

random = Utility.RandomInt(1, 100) 

Debug.Notification("20 percent chance of moan: "+random) 

if  random < 21 

random1 = Utility.RandomInt(1, 100)  

Debug.Notification("random1: "+random1) 

if random1 < 8 && random1 > 0 

instanceID00 = Zombie1TT.Play(Self) 

                         elseif random1 < 15 && random1 > 8  

instanceID00 = Zombie2TT.Play(Self)                               

                         elseif random1 < 20 && random1 > 15 

instanceID00 = Zombie3TT.Play(Self)                              

                         elseif random1 < 30 && random1 > 20 

instanceID00 = Zombie4TT.Play(Self)                                 

                         elseif random1 < 40 && random1 > 30 

instanceID00 = Zombie5TT.Play(Self)                                

                         elseif random1 < 50 && random1 > 40 

instanceID00 = Zombie6TT.Play(Self)   

                         elseif random1 < 60 && random1 > 50  

instanceID00 = Zombie7TT.Play(Self)                              

                         elseif random1 < 70 && random1 > 60 

instanceID00 = Zombie8TT.Play(Self)                                  

                         elseif random1 < 80 && random1 > 70 

instanceID00 = Zombie9TT.Play(Self)                                

                         elseif random1 < 90 && random1 > 80 

instanceID00 = Zombie10TT.Play(Self) 

                         elseif random1 <101 && random1 > 90 

instanceID00 = Zombie11TT.Play(Self) 

                        endif  

endif 

                endif 

        endif 

endif 

if timer >0 

timer = timer - 1 

Debug.Notification("timer minus 1: "+timer) 

endif 

EndEvent 










Sound Property Zombie1TT  Auto   


Sound Property Zombie2TT  Auto   


Sound Property Zombie3TT  Auto   


Sound Property Zombie4TT  Auto   


Sound Property Zombie5TT  Auto   


Sound Property Zombie6TT  Auto   


Sound Property Zombie7TT  Auto   


Sound Property Zombie8TT  Auto   


Sound Property Zombie9TT  Auto   


Sound Property Zombie10TT  Auto   


Sound Property Zombie11TT  Auto  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...