Dizturbed
Member
Posts: 160
Threads: 39
Joined: Jun 2011
Reputation:
0
|
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 |
|
Tanshaydar
From Beyond
Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation:
67
|
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 |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
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 |
|
Tanshaydar
From Beyond
Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation:
67
|
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 |
|
|