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
Manually Stopping Monster Music?
Dizturbed Offline
Member

Posts: 160
Threads: 39
Joined: Jun 2011
Reputation: 0
#11
RE: Manually Stopping Monster Music?

Delete some of the variable's in the model editor, and then save as =))

08-17-2011, 11:02 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#12
RE: Manually Stopping Monster Music?

(08-17-2011, 10:52 PM)palistov Wrote: Try this looping timer.

bool bMonsterActive = false;

void MonsterStuff(blahblah blahblah)
{
    SetEntityActive("grunty", true);
    PlayMusic("gruntymusic.ogg", true, 1, 0, 0, true);
    bMonsterActive = true;
    AddTimer("", 5, "MonsterCheck");
}

void MonsterCheck(string &in timer)
{
    bMonsterActive = GetEntityExists("grunty") ? true : false;
    if(!bMonsterActive) PlayMusic("newmusic.ogg", true, 1, 0, 0, 0, true);
    AddTimer("", 5, "MonsterCheck");
}

What I was thinking is something like that, but that requires to check whether monster seeing the player, or chasing the player. Requires more work, which I don't feel like doing lately.

Well, thanks for the help all!

(This post was last modified: 08-17-2011, 11:37 PM by Tanshaydar.)
08-17-2011, 11:37 PM
Website Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#13
RE: Manually Stopping Monster Music?

You can leave the attack and search music at its default. If you delete just the danger music field from the variables, then there will be no music playing when the monster is just active and patrolling. With that script the music will still play but just not be heard while the player is being chased or searched for, because there will be the attack music or hunt music being played. When the monster returns to its patrol the music should again be heard. And when you deactivate the monster it should go away.

08-17-2011, 11:41 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#14
RE: Manually Stopping Monster Music?

I guess there was something buggy, because if monster never sees player, when deactivated music stops playing. However, if monster ever sees player, no matter what I do default monster music kept playing.

I'm playing with entity settings, and in level there might be other things that might be causing conflicts. I'll test it, if it won't work, I'll come back to your script eventually.

08-18-2011, 09:10 AM
Website Find




Users browsing this thread: 2 Guest(s)