| 
		
	
		| nkmol   Senior Member
 
 Posts: 252
 Threads: 19
 Joined: Feb 2011
 Reputation: 
4
 | 
			| RE: Forge to look at object script 
 
				an example, if the brute is in front of my cabine (pathnodearea_1) there is a script on that area (scriptArea_2) for sounds.  
but when i put like react_breath.snt there is only 1 sound, that's not very long    so how could i activate multiple sounds, different .ogg files, and not at one time? 
 void WalkLeave(string &in asTimer){
 AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 5.0f, "");
 AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 3.0f, "");
 AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0.0f, "");
 AddEntityCollideCallback("servant_grunt_1", "ScriptArea_1", "Leaving", false, 1);
 AddEntityCollideCallback("servant_grunt_1", "ScriptArea_2", "Sound", true, 1);
 }
 
 void Sound(string &in asParent, string &in asChild, int alState)
 {
 PlaySoundAtEntity("PlayerScared", "react_breath.snt", "Player", 0.0f, true);
 }
				
(This post was last modified: 02-22-2011, 09:28 PM by nkmol.)
 |  |  
	| 02-22-2011, 09:27 PM |  |  
	
		| nkmol   Senior Member
 
 Posts: 252
 Threads: 19
 Joined: Feb 2011
 Reputation: 
4
 | 
			| RE: Nkmols' question 
 
				Solved it already, feels stupid if i solve my self, sorry have to look better    
Edited my react_breath.snt in notepad and saved as a new file. 
putted Loop="true" and Random = "6" (i thought i needed that for the 6differents .ogg sounds, random play them)
			
				
(This post was last modified: 02-22-2011, 10:41 PM by nkmol.)
 |  |  
	| 02-22-2011, 10:40 PM |  |  
	
		| nkmol   Senior Member
 
 Posts: 252
 Threads: 19
 Joined: Feb 2011
 Reputation: 
4
 | 
			| RE: Nkmols' question 
 
				Got a new question again    how could the brute hit the Cabinet like 2times? I have no idea which script i should use :S
			 |  |  
	| 02-23-2011, 04:55 PM |  |  
	
		| Tanshaydar   From Beyond
 
 Posts: 3,085
 Threads: 17
 Joined: Mar 2009
 Reputation: 
67
 | 
			| RE: Nkmols' question 
 
				After 2 hits, deactivate it?
			 
 |  |  
	| 02-23-2011, 07:16 PM |  |  
	
		| nkmol   Senior Member
 
 Posts: 252
 Threads: 19
 Joined: Feb 2011
 Reputation: 
4
 | 
			| RE: Nkmols' question 
 
				 (02-23-2011, 07:16 PM)Tanshaydar Wrote:  After 2 hits, deactivate it? 
well the brute should first walk to PathNodeArea_1 and the brute will stand there for a while. after that he needs to notice you and has to hit the cabinet for a couple of times. After that, he doesn't notice you anymore and he will go to the next path, PathNodeArea_2
			 
				
(This post was last modified: 02-23-2011, 10:53 PM by nkmol.)
 |  |  
	| 02-23-2011, 09:46 PM |  |  
	
		| nkmol   Senior Member
 
 Posts: 252
 Threads: 19
 Joined: Feb 2011
 Reputation: 
4
 | 
			| RE: Nkmols' question 
 
				Is there a script for setting detection of "Player" on true? So the monster that's spawned atm Will find you, even if your hidded.
			 |  |  
	| 02-24-2011, 10:46 PM |  |  
	
		| Linus Ågren   Senior Member
 
 Posts: 309
 Threads: 58
 Joined: Jan 2011
 Reputation: 
5
 | 
			| RE: Nkmols' question 
 
				ShowEnemyPlayerPosition(string& asName); 
asName = Name of monster   
 Creator of The Dark Treasure. |  |  
	| 02-24-2011, 10:48 PM |  |  
	
		| nkmol   Senior Member
 
 Posts: 252
 Threads: 19
 Joined: Feb 2011
 Reputation: 
4
 | 
			| RE: Nkmols' question 
 
				 (02-24-2011, 10:48 PM)junkfood2121 Wrote:  ShowEnemyPlayerPosition(string& asName);asName = Name of monster
  thnx!  
and how to get undetected?    
edited: solved it whith adding a new grunt. but if anybody know a undetected script, feel free to reply    
but i got a new problem that doesn't want to work, i'm trying to add a message when i dont have the key for the cabinet (that's locked) :
 
.hps
 void UsedKeyDoor(string &in asItem, string &in asEntity){
 if(HasItem("key_tower_1") == true)
 {
 SetSwingDoorLocked(asEntity, false, true);
 PlayGuiSound("unlock_door.snt", -1);
 GiveSanityBoost();
 RemoveItem("key_tower_1");
 AutoSave();
 
 }
 else
 {
 SetMessage("Hints", "CabinetLocked", -1);
 }
 }
.lang
 <CATEGORY Name="Hints"><Entry Name="CabinetLocked">It's locked</Entry>
 </CATEGORY>
 
				
(This post was last modified: 02-25-2011, 05:31 PM by nkmol.)
 |  |  
	| 02-25-2011, 03:35 PM |  |  
	
		| nkmol   Senior Member
 
 Posts: 252
 Threads: 19
 Joined: Feb 2011
 Reputation: 
4
 | 
			| RE: Nkmols' question 
 
				i cant find the problem of this message script    someone knows the answer?    |  |  
	| 02-27-2011, 04:29 PM |  |  
	
		| Linus Ågren   Senior Member
 
 Posts: 309
 Threads: 58
 Joined: Jan 2011
 Reputation: 
5
 | 
			| RE: Nkmols' question 
 
				I don't think you're going to have the brackets after the "else". void UsedKeyDoor(string &in asItem, string &in asEntity){
 if(HasItem("key_tower_1") == true)
 {
 SetSwingDoorLocked(asEntity, false, true);
 PlayGuiSound("unlock_door.snt", -1);
 GiveSanityBoost();
 RemoveItem("key_tower_1");
 AutoSave();
 
 }
 else SetMessage("Hints", "CabinetLocked", -1);
 }
 Creator of The Dark Treasure. |  |  
	| 02-27-2011, 05:15 PM |  |  |