| 
		
	
		| jessehmusic   Senior Member
 
 Posts: 423
 Threads: 102
 Joined: Dec 2011
 Reputation: 
8
 | 
			| Horror Event Wont work... 
 
				Hello my event with scare wont work dont know why any clue hps-->
 
 void OnStart()
 {
 AddUseItemCallback("", "hollow_needle_1", "Locked_door", "NeedleOnDoor", true);
 AddEntityCollideCallback("Player", "Horror_Barrel", "Horror_Barrel_Event", true, 1);
 }
 void NeedleOnDoor(string &in asItem, string &in asEntity)
 {
 SetSwingDoorLocked("Locked_door", false, true);
 PlaySoundAtEntity("", "unlock_door", "Locked_door", 0, false);
 RemoveItem("hollow_needle_1");
 }
 void Horror_Barrel_Event(string &in asParent, string &in asChild, int alState)
 {
 SetEntityActive("Horror_Barrel", false);
 PlaySoundAtEntity("Horror_Barrel", "24_iron_maiden.snt", "Player", 0, false);
 }
 
 void OnEnter()
 {
 AddEntityCollideCallback("Player", "MusicStart_1", "Music1", true, 1);
 }
 
 void Music1(string &in asParent, string &in asChild, int alState)
 {
 PlayMusic("ambience_voice.ogg", true, 0.8f, 1, 0, true);
 }
 
 
				
(This post was last modified: 04-04-2012, 04:23 PM by jessehmusic.)
 |  |  
	| 04-04-2012, 09:16 AM |  |  
	
		| flamez3   Posting Freak
 
 Posts: 1,281
 Threads: 48
 Joined: Apr 2011
 Reputation: 
57
 | 
			| RE: Horror Event Wont work... 
 
				It'd be cool to know what your problem is, instead of us guessing. And with the majority of your posts asking for help I thought you would know this -_-
			 
 
				
(This post was last modified: 04-04-2012, 09:34 AM by flamez3.)
 |  |  
	| 04-04-2012, 09:33 AM |  |  
	
		| Cranky Old Man   Posting Freak
 
 Posts: 986
 Threads: 20
 Joined: Apr 2012
 Reputation: 
38
 | 
			| RE: Horror Event Wont work... 
 
				 (04-04-2012, 09:16 AM)jessehmusic Wrote:  PlaySoundAtEntity("Horror_Barrel", "24_iron_maiden.snt", "Player", 0, false); I see the problem. Use another sample than "24_iron_maiden.ogg", or players will groan and be pissed at you.    
 |  |  
	| 04-04-2012, 09:45 AM |  |  
	
		| jessehmusic   Senior Member
 
 Posts: 423
 Threads: 102
 Joined: Dec 2011
 Reputation: 
8
 | 
			| RE: Horror Event Wont work... 
 
				The script dosnt call....
			 
 |  |  
	| 04-04-2012, 03:33 PM |  |  
	
		| JetlinerX   Senior Member
 
 Posts: 599
 Threads: 49
 Joined: Jun 2011
 Reputation: 
19
 | 
			| RE: Horror Event Wont work... 
 
				FYI - OnStart () and OnEnter () are the same. You have two of them. Try this:
 PS: I HIGHLY suggest removing the over played jumpscare you have in here...
 
 void OnStart()
 {
 AddUseItemCallback("", "hollow_needle_1", "Locked_door", "NeedleOnDoor", true);
 AddEntityCollideCallback("Player", "Horror_Barrel", "Horror_Barrel_Event", true, 1);
 AddEntityCollideCallback("Player", "MusicStart_1", "Music1", true, 1);
 }
 
 void NeedleOnDoor(string &in asItem, string &in asEntity)
 {
 SetSwingDoorLocked("Locked_door", false, true);
 PlaySoundAtEntity("", "unlock_door", "Locked_door", 0, false);
 RemoveItem("hollow_needle_1");
 }
 
 void Horror_Barrel_Event(string &in asParent, string &in asChild, int alState)
 {
 SetEntityActive("Horror_Barrel", false);
 PlaySoundAtEntity("Horror_Barrel", "24_iron_maiden.snt", "Player", 0, false);
 }
 
 void Music1(string &in asParent, string &in asChild, int alState)
 
 {
 PlayMusic("ambience_voice.ogg", true, 0.8f, 1, 0, true);
 }
 
 
 
				
(This post was last modified: 04-04-2012, 03:38 PM by JetlinerX.)
 |  |  
	| 04-04-2012, 03:37 PM |  |  
	
		| jessehmusic   Senior Member
 
 Posts: 423
 Threads: 102
 Joined: Dec 2011
 Reputation: 
8
 | 
			| RE: Horror Event Wont work... 
 
				 (04-04-2012, 03:37 PM)JetlinerX Wrote:  FYI - OnStart () and OnEnter () are the same. You have two of them. Try this:
 PS: I HIGHLY suggest removing the over played jumpscare you have in here...
 
 void OnStart()
 {
 AddUseItemCallback("", "hollow_needle_1", "Locked_door", "NeedleOnDoor", true);
 AddEntityCollideCallback("Player", "Horror_Barrel", "Horror_Barrel_Event", true, 1);
 AddEntityCollideCallback("Player", "MusicStart_1", "Music1", true, 1);
 }
 
 void NeedleOnDoor(string &in asItem, string &in asEntity)
 {
 SetSwingDoorLocked("Locked_door", false, true);
 PlaySoundAtEntity("", "unlock_door", "Locked_door", 0, false);
 RemoveItem("hollow_needle_1");
 }
 
 void Horror_Barrel_Event(string &in asParent, string &in asChild, int alState)
 {
 SetEntityActive("Horror_Barrel", false);
 PlaySoundAtEntity("Horror_Barrel", "24_iron_maiden.snt", "Player", 0, false);
 }
 
 void Music1(string &in asParent, string &in asChild, int alState)
 
 {
 PlayMusic("ambience_voice.ogg", true, 0.8f, 1, 0, true);
 }
 Dosnt work :/ Still same prob
			 
 |  |  
	| 04-04-2012, 03:41 PM |  |  
	
		| JetlinerX   Senior Member
 
 Posts: 599
 Threads: 49
 Joined: Jun 2011
 Reputation: 
19
 | 
			| RE: Horror Event Wont work... 
 
				Map has the same name as the script, yes?
 Example:
 
 Map01.map
 and
 Map01.hps
 
 
 |  |  
	| 04-04-2012, 03:43 PM |  |  
	
		| jessehmusic   Senior Member
 
 Posts: 423
 Threads: 102
 Joined: Dec 2011
 Reputation: 
8
 | 
			| RE: Horror Event Wont work... 
 
				 (04-04-2012, 03:43 PM)JetlinerX Wrote:  Map has the same name as the script, yes?
 Example:
 
 Map01.map
 and
 Map01.hps
 yes ofc , the Hallow Needle Addusecallback work
			 
 |  |  
	| 04-04-2012, 03:44 PM |  |  
	
		| JetlinerX   Senior Member
 
 Posts: 599
 Threads: 49
 Joined: Jun 2011
 Reputation: 
19
 | 
			| RE: Horror Event Wont work... 
 
				Have you checked the names of your script areas in the level editor? Also, have you added any Debug messages to check the execution of your scripts?
 
 |  |  
	| 04-04-2012, 03:50 PM |  |  
	
		| jessehmusic   Senior Member
 
 Posts: 423
 Threads: 102
 Joined: Dec 2011
 Reputation: 
8
 | 
			| RE: Horror Event Wont work... 
 
				 (04-04-2012, 03:50 PM)JetlinerX Wrote:  Have you checked the names of your script areas in the level editor? Also, have you added any Debug messages to check the execution of your scripts? yes.... 
			 
 |  |  
	| 04-04-2012, 03:52 PM |  |  |