Jump to content

emeryrik

Members
  • Posts

    4
  • Joined

  • Last visited

Nexus Mods Profile

About emeryrik

Profile Fields

  • Country
    United States

emeryrik's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Alright, just to bump this thread and give an update, I realized how scripts work when they're attached to a quest, so I made a quest with the script attached and the properties pointing to sounds and a time interval, but still nothing happens. I've tried all types of methods, including having the quest run at start, manually starting it via console, and starting it with a trigger, but nothing works. Does anyone have any insight on why my methods of getting this to work aren't working or why the script itself may not work (I'm not sure what else could be wrong). Thanks in advance to anyone who can help me along a little further!
  2. Okay, so basically I am trying to make sounds play at smaller and smaller intervals as hunger, thirst, and sleepiness increase. That is, if you are 'peckish' a very small stomach rumble will play every 5 minutes, if you are 'hungry' a louder, different sound will play every 4 minutes, etc. I created a crude flow chart with a minimal example concerning thirst: http://akanto10.weebly.com/uploads/9/2/3/9/923988/untitled_orig.jpg To address the way I set up the quest, I have no idea what I'm doing. I used log entries because it looks like you can use conditions for them and they can run their own scripts. That means, I could satisfy actor value conditions for each stage of hunger, thirst, and sleepiness and then run a script with its own sound properties. Here's what I have: http://akanto10.weebly.com/uploads/9/2/3/9/923988/screen_orig.jpg
  3. Hi scrivener07! Thanks for your reply. It compiles, but I have a few questions about how to apply it. I created a new quest that runs at the start of the game with one stage that runs on start. I set a couple of log entries with conditions for the corresponding actor values. I loaded the script in the scripts section. Now, how would I go about running the script with unique property values for each log entry? Should I use kmyQuest somehow? I appreciate your help!
  4. This is my first stab at scripting with Papyrus, but I'm having trouble getting something to work. I've been working on making a mod that plays sounds based on the player's hunger, thirst, and sleep levels. I went about this by adding a new scripted magic effect to the hunger, thirst, and sleep potions in the Creation Kit. Here's what I started with: Scriptname Hardcore:HC_VitalEffect_SoundScript extends ActiveMagicEffect Group Data Sound Property SoundToPlay const auto mandatory{sound to be played} float Property SoundTimerInterval = 0.0 const auto{how often sound will play} EndGroup Event OnEffectStart(Actor akTarget, Actor akCaster)SoundToPlay.Play(Game.GetPlayer())startTimer(SoundTimerInterval)EndEvent Function PlaySoundAndStartTimer()if IsBoundGameObjectAvailable()SoundToPlay.Play(Game.GetPlayer())startTimer(SoundTimerInterval)endifEndFunction Event OnTimer(int aiTimerID)PlaySoundAndStartTimer()EndEvent This works great, but only if a unisex sound is played; that is, it can only play one sound regardless if the player is female or male. Therefore, this is what I came up with: Scriptname Hardcore:HC_VitalEffect_SoundScript extends ObjectReference Group Data Sound Property FemaleSound const auto mandatory{sound to be played for female player} Sound Property MaleSound const auto mandatory{sound to be played for male player} float Property SoundTimerInterval const auto mandatory{how often sound will play} EndGroup Event OnInit()if (Game.GetPlayer().GetBaseObject() as ActorBase).GetSex() == 1FemaleSound.play(Game.GetPlayer()) elseMaleSound.play(Game.GetPlayer()) endifstartTimer(SoundTimerInterval)EndEvent Function PlaySoundAndStartTimer()if IsBoundGameObjectAvailable()if (Game.GetPlayer().GetBaseObject() as ActorBase).GetSex() == 1FemaleSound.play(Game.GetPlayer()) elseMaleSound.play(Game.GetPlayer()) endifstartTimer(SoundTimerInterval)endifEndFunction Event OnTimer(int aiTimerID)PlaySoundAndStartTimer()EndEvent This, however, does not work. I copied the GetSex function from drinkFromFountainScript.psc, and because my script extends the same parent script it should work correctly. Can someone with more knowledge of Papyrus be able to diagnose this? Thank you, Akanto10
×
×
  • Create New...