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...

Tonycubed2

Allies
  • Posts

    42
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Tonycubed2

  1. Done with this script. Posting it here in case it can help someone. The script only runs at at night, from 8pm to 4am. The script will play 11 different spooky sounds at tandom times once player enters the area with the activator. And it will spawn a random number of undead with a slight chance of spawning a Dremora. 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 random5 int random6 int myNum int myLoop int timer int instanceID00 ObjectReference property mySoundOrigin auto ObjectReference Property dhLoc Auto ObjectReference Property dhLo2 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) if (akActionRef == Game.GetPlayer()) if IsTimeValid() random3 = Utility.RandomInt(1, 300) random6 = Utility.RandomInt(2, 10) if random3 < 2 random4 = Utility.RandomInt(1, 10) if random4 > 5 dhLoc.PlaceAtMe (LivingDead , random6) Debug.Notification("Ambush!") instanceID00 = Zombie6TT.Play(Self) Else dhLo2.PlaceAtMe (LivingDead , random6) Debug.Notification("Undead!!") instanceID00 = Zombie6TT.Play(Self) endif random5 = Utility.RandomInt(1, 10) if random5 > 7 dhLoc.PlaceAtMe (Warlock, 1) endif endif if timer < 1 timer = Utility.RandomInt(5, 25) random = Utility.RandomInt(1, 100) if random < 21 random1 = Utility.RandomInt(1, 100) 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 if timer >0 timer = timer - 1 endif 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 ActorBase Property LivingDead Auto Int Property random4 Auto ActorBase Property Warlock Auto
  2. Is this the right forum for BSA questions? I looked at the choices and this seemed the best. Are there any tutorials on making a BSA file for skyring? Trying ot make it easier to distribute my one mod. Tony
  3. Got the random monster sounds working, now I just need to add script to spawn undead and it will be all done. Script also makes sure the game time is between 10pm and 4am. 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
  4. Is there a special procedure for getting the ckit to acccept wav files in the sound descriptors? I have been trying for hours, copying the bitrate and sampling rates of working wav files but my wav files will not play. Any hints?

  5. GetSecondsPassed cannot be used in a script, unlike Oblvion and others. Took me a looooong time to learn that one. Can only be used in the drop down menu boxes where it is appropiate. Sigh.
  6. Indeed I am trying the trigger zone. Since I need it to run continuously I could not use ontriggerentermor ontriggerleave (syntax approximate). I am using just on trigger which will run continuously as long as the player is in the field. But I worry about CPU usage and how that may affect fps for the people using the mod. And I need a pause between the sound effects to make them appear random, which is another problem. The wait command halts the entire script, which is no good since the same script willbe spawning monsters randomly.
  7. Very very helpful. Now to solve the problem of how to activate it while player is near graveyard. Thank you very much.
  8. I played some more with the new objects, and was able to place them near the area I wanted. How far they can be heard from ground zero is determined by which model you attach to them. But they are designed to play continously or in a single shot. Like a brook flowing. Not at random times. Can't have a zombie moaning 24/7. Willisea, when you made your script, what did you attach it to? Where is the script firing from? Also, would it be possible to post a sample script that picks random sounds for plagiarism, I mean, leaning purposes?
  9. If so, is there a better way then to have a variety of spooky sounds play at night in a graveyard? . I can't believe bethesda made no sound tutorial after covering all else. Weird.
  10. Ok, I am home for a few minutes. Here are screenshots showing the cricket Sound Descriptors, notice on the second picture the check box that says "conditions", if you check it off then you can get to the second tab with the same name and set time conditions (many many other conditions besides time too can be used in many ways). Picture three will show that. The green placeable sound markers use a reference that point back to this Sound Descriptors. A nice feature is that you can have many many related sounds in the descriptor and it will play them back randomly. Why there is gazillion of cricket sound descriptors all timed is a mystery to me. Another interesting thing: there is a script box as well that will accept scrips in teh palced greeen box. Makes it super flexible for other things . Pic 1: http://img196.imageshack.us/img196/5461/soundpic1.jpg Pic 2: http://img201.imageshack.us/img201/9481/soundpic2.jpg Pic 3: http://img804.imageshack.us/img804/3659/soundpic3.jpg Just in case the links do not work as expected here is the link to my imageshack folder: http://my.imageshack.us/v_images.php
  11. Will post examples tonight, thanks for allowing topic. You will be surprised how many sounds are timed. And there are like over 20 cricket sounds in the game with conditional time statements. But can't do this while driving...
  12. Greetings, Am I imagining things or is there zero tutorials out there on how to use sound with skyrim papyrus?? None of the 10 Bethesda tutorials cover it. No you tube videos explain it. Found nothing here, either. I managed to copy a game example and placed a sound market to play spooky sounds at night. The premade cricket sound markers were great since they appear only t night. Seemed easy to place. But they play 24/7 though they should not. Are they supposed to be hidden? Inhavebthem on the main road next to a graveyard. If I walk over them they activate no matter the time. Is that why some sound markers are inside walls? And how to extend the range they can be heard. We need a good tutorial on this. Respectfully Tony
  13. I wish I had seen the GetCurrentTime before. I searched for something like that , too. Well, I got it working finally. Took 2 days. I feel like I discovered e=mc2 . At this rate the mod should be done by the year 3022 . here is the code I used, and I did add a line to display the time in the function for testing, that was very helpful. Next I need to spawn some skeletons at random moments during the witching hours and add some equally random spooky noises. Then on to infect every gravestone in the game. Almost. p.s.: thanks for the suggestions, it helps to bounce stuff off someone. p.s.s: Is there a text editor that I can use for skyrim that uses the color coding I see here? It is very cool. Using Sublime Text now. Let me look for the code box thingy. Scriptname TombsHaunted extends ObjectReference GlobalVariable property GameHour auto Float Property NoEarlierThan = 20.0 Auto Float Property NoLaterThan = 4.0 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 OnTriggerEnter(ObjectReference akActionRef) Debug.Notification("Triggered") if (akActionRef == Game.GetPlayer()) if IsTimeValid() Debug.Notification("Time is Valid") endif endif Debug.Notification(GameHour.GetValue()) EndEvent
  14. Well, I am somewhat closer than this morning. I saw the string one, but not usable to compare integers. There is a Global variable called GameHour that does keep a 24 hour clock. back in previous games the variable could be compared to an integer directly. No more. Global variables cannot be used now like that. I am testing for valid time being between 10pm and 4 am. The followintg script compiles but I am still doing something wrong: Scriptname TombstoneDanger extends ObjectReference GlobalVariable property GameHour auto Float Property NoEarlierThan = 20.0 Auto Float Property NoLaterThan = 4.0 Auto bool function IsTimeValid() Float Timeofday = GameHour.GetValue() if Timeofday > 13 if Timeofday >= NoEarlierThan return TRUE endif elseif Timeofday <= NoLaterThan return TRUE endif Return FALSE endFunction Event OnTriggerEnter(ObjectReference akActionRef) Debug.Notification("Triggered") if (akActionRef == Game.GetPlayer()) if IsTimeValid() Debug.Notification("Time is Valid") endif endif EndEvent
  15. Greetings, I have serached the wikis and other material I found on the web but found no examples or solutions to creating a skyrim script that uses the time of day. I need to wirte a if-then script that activates on the player approaching a grave stone betwee the hours of 11pm and 4 am. Setting a trigger for it was easy, but I can't find a solution ofr getting the time of day/night, as in 3am, 2pm, etc. Anyhelp apprecaited. I hope this is the right forum. First time here. Respectfully, Tony
×
×
  • Create New...