SLAMnesia
Member
Posts: 99
Threads: 39
Joined: May 2011
Reputation:
0
|
very quick problem!
I have a zombie/pathnode script set up. I just made it and its pretty simple but I have one problema.
I don't want the zombie to be active before the player hits the area that triggers pathnodes, in other words; Before I move into the area that triggers the zombie to walk on pathnodes, the "a zombie is nearby" music starts playing and that gives the scare away :\ How do I make it so there is no music (or the zombie isn't active) until I get into the script area?
here's my script so far:
Quote:AddEntityCollideCallback("Player", "zareaactivate", "ZombieWalk", true, 1);
void ZombieWalk(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt1", true);
AddEnemyPatrolNode("grunt1", "path1", 1, "");
AddEnemyPatrolNode("grunt1", "path2", 1, "");
AddEnemyPatrolNode("grunt1", "path3", 1, "");
}
|
|
06-06-2011, 06:17 AM |
|
Rownbear
Member
Posts: 157
Threads: 13
Joined: Apr 2011
Reputation:
2
|
RE: very quick problem!
I don't know how to make the music go away, your script seems to be right but dont forget to click on the grunt1 in the level editor and uncheck the box that says [active], or else he will be activated all the time. that goes for all SetEntityActive unless it's false, when you want it to go away.
EDIT: try that script and if the music still comes try to use
StopMusic(0, 10);
in the ZombieWalk or you might need to add a timer first which then stops the music, like:
void ZombieWalk(string &in asParent, string &in asChild, int alState)
{
AddTimer("", 0.01, "MusicStop");
SetEntityActive("grunt1", true);
AddEnemyPatrolNode("grunt1", "path1", 1, "");
AddEnemyPatrolNode("grunt1", "path2", 1, "");
AddEnemyPatrolNode("grunt1", "path3", 1, "");
}
void MusicStop(string &in asTimer)
{
StopMusic(0, 10);
}
(This post was last modified: 06-06-2011, 07:35 AM by Rownbear.)
|
|
06-06-2011, 07:06 AM |
|
SLAMnesia
Member
Posts: 99
Threads: 39
Joined: May 2011
Reputation:
0
|
RE: very quick problem!
Super! it worked
props to u friend
|
|
06-07-2011, 05:04 PM |
|
GraphicsKid
Senior Member
Posts: 258
Threads: 34
Joined: Dec 2010
Reputation:
3
|
RE: very quick problem!
The grunt active sound still plays... not sure if you want that. That's still warning. The way I did it is you just open up the Model Editor, open up the grunt, remove the active sount and the dan_grunt.ogg entry (so it'll still play the music once you're seen, but won't give you any warning beforehand). Then save it as like servant_grunt_noSound.ent or something like that. Then be sure to put that in the entities folder in BOTH the main folder in Amnesia, AND your custom entities folder in your custom story. (main folder so it shows up in the editor, custom folder so you can distribute it).
Then, in the editor, place a regular grunt, and just change the .ent path to the noSound one you created.
(This post was last modified: 06-08-2011, 11:30 PM by GraphicsKid.)
|
|
06-08-2011, 11:29 PM |
|
SLAMnesia
Member
Posts: 99
Threads: 39
Joined: May 2011
Reputation:
0
|
RE: very quick problem!
I have the grunt spawn right behind a corner and walk around towards the player so theres not alot of music being played before you see him. It would be good though i guess so you never know if the grunt faded away after hiding for 20 seconds or so
|
|
06-09-2011, 04:21 PM |
|
|