very quick problem! - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: very quick problem! (/thread-8471.html) |
very quick problem! - SLAMnesia - 06-06-2011 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); RE: very quick problem! - Rownbear - 06-06-2011 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); } RE: very quick problem! - SLAMnesia - 06-07-2011 Super! it worked props to u friend RE: very quick problem! - GraphicsKid - 06-08-2011 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. RE: very quick problem! - SLAMnesia - 06-09-2011 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 |