Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Music Interruption
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Music Interruption

(05-18-2014, 03:35 PM)Plazmater Wrote: So my problem is , while making monster active i want at the same time play music.

Script:

void BruteActivated(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
SetEnemyDisableTriggers("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0.001, "");
AddTimer("Sanity", 1, "SanityEvent");
}

void SanityEvent(string &in asTimer)
{
GiveSanityDamage(15.0f, true);
PlayMusic("11_event_tree.ogg", false, 1.0f, 0, 0, true);
}

But, it wont let play event music to the end because it interrupts with brute music.

So, how do i do that ? I want the whole music to be played and not be interrupted.

This same thing can be for example Morgue level from original game, when after injecting blood, brute spawns but it lets event music to be played first to the end.

It's called the priority. The ones that have a higher priority will be played executed first.
In PlayMusic's fifth argument, there's an integer for alPrio. That's the priority.
Just set the alPrio to a higher priority and it should do it.

EDIT:
Okay, Layman's terms:
Just change the bolded number to higher than 1 like 2 or 3 or 4, etc.
PlayMusic("11_event_tree.ogg", false, 1.0f, 0, 0, true);

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 05-18-2014, 03:48 PM by PutraenusAlivius.)
05-18-2014, 03:39 PM
Find


Messages In This Thread
Music Interruption - by Plazmater - 05-18-2014, 03:35 PM
RE: Music Interruption - by PutraenusAlivius - 05-18-2014, 03:39 PM
RE: Music Interruption - by Plazmater - 05-18-2014, 03:56 PM
RE: Music Interruption - by PutraenusAlivius - 05-18-2014, 03:58 PM
RE: Music Interruption - by Plazmater - 05-18-2014, 04:02 PM
RE: Music Interruption - by PutraenusAlivius - 05-18-2014, 04:04 PM
RE: Music Interruption - by Plazmater - 05-18-2014, 04:12 PM
RE: Music Interruption - by Radical Batz - 05-18-2014, 04:18 PM



Users browsing this thread: 1 Guest(s)