Aller au contenu

Photo

Complete Noob Question, but...


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
Nwalya42

Nwalya42
  • Members
  • 306 messages
... how on earth do you get sounds working? I can't seem to get them working at all. I want a music playing in the background (say the tavern from the arl soundset) as well as conversation ambient noise (mutterings etc) and fire crakling. How do you get these in game? I have tried placing audio objects and have tried using music volume, but no luck so far.
I was hoping someone could give me the simple guide on how to put music in an area.

#2
dinotts

dinotts
  • Members
  • 3 messages
I'm a noob too and I am having the same problem as you,



I have tried music and audio volumes, and can get sound emmiters and volumes to work with sounds but not with music at all.



When I try changing the music preset in my area (not main campaign) the NTB ruins preset works with a music volume over the area, but other presets like NTB-forest and NTB-werewolves do nothing.



I am so confused can anyone help

#3
Nwalya42

Nwalya42
  • Members
  • 306 messages
Not sure if this is how you're supposed to do it, but it works. Use this as the area script and add a sound object of the desired music called main - make sure you set fade in/out or it sneaks up on you a bit.

#include "events_h"
#include "wrappers_h"

void main()
{
    event ev = GetCurrentEvent();
    int nEventType = GetEventType(ev);

    switch(nEventType)
    {
        case EVENT_TYPE_ENTER:
        {
        PlayMusic("main");
        break; 
        }
    }   

    HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
}


#4
dinotts

dinotts
  • Members
  • 3 messages
Thanks a lot



I am going to try this soon. Hopefully it will work.