| 
		
	
		| Watskeeee   Junior Member
 
 Posts: 8
 Threads: 3
 Joined: Jun 2012
 Reputation: 
0
 | 
			| AddEntityCollideCallBack(): Support Needed! 
 
				void OnStart(){
 AddUseItemCallback("", "key01", "doorroom01", "KeyOnDoor", true);
 AddUseItemCallback("", "key02", "doorroom02", "KeyOnDoor", true);
 AddEntityCollideCallback("Player","RoomofSecretsArea","CollideRoomTwo","true", 1);
 }
 
 void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
 {
 SetSwingDoorClosed("doorroom01", true, true);
 }
 
 
 void KeyOnDoor(string &in asItem, string &in asEntity)
 {
 SetSwingDoorLocked("doorroom01", false, true);
 PlaySoundAtEntity("", "unlock_door", "doorroom01", 0, false);
 RemoveItem("key01");
 }
 
 
 void keyfunc(string &in asEntity, string &in type)
 {
 SetEntityActive("servant_brute_1", true);
 StartPlayerLookAt("servant_brute_1", 15, 15, "");
 AddTimer("monstertimer", 2, "monstertimer");
 ShowEnemyPlayerPosition("servant_brute_1");
 
 }
 
 
 void monstertimer(string &in asTimer)
 {
 StopPlayerLookAt();
 }
 
 
 Trying to make the door shut behind me, yet it comes up with the error;
 
 FATAL ERROR: Could not load script file 'custom_stories/Amnesia - Hour of Twilight/maps/00_example.hps'!
 main (5,1): ERR: No matching signatures to
 'AddEntityCollideCallBack(string@&, string@&, string@&,const uint)'
 
 Tried for an hours or two to fix this and no progress has been made..
 |  |  
	| 06-19-2012, 02:19 PM |  |  
	
		| Datguy5   Senior Member
 
 Posts: 629
 Threads: 25
 Joined: Dec 2011
 Reputation: 
12
 | 
			| RE: AddEntityCollideCallBack(): Support Needed! 
 
				make sure the hps and the map have the same name.
			 
 |  |  
	| 06-19-2012, 02:53 PM |  |  
	
		| Watskeeee   Junior Member
 
 Posts: 8
 Threads: 3
 Joined: Jun 2012
 Reputation: 
0
 | 
			| RE: AddEntityCollideCallBack(): Support Needed! 
 
				Yep, They have the exact same name.00_example.hps
 00_example.map
 |  |  
	| 06-19-2012, 03:03 PM |  |  
	
		| Cruzore   Senior Member
 
 Posts: 301
 Threads: 2
 Joined: Jun 2012
 Reputation: 
37
 | 
			| RE: AddEntityCollideCallBack(): Support Needed! 
 
				AddEntityCollideCallback("Player","RoomofSecretsArea","CollideRoomTwo","true", 1);true is inside ".
 |  |  
	| 06-19-2012, 03:32 PM |  |  
	
		| Rownbear   Member
 
 Posts: 157
 Threads: 13
 Joined: Apr 2011
 Reputation: 
2
 | 
			| RE: AddEntityCollideCallBack(): Support Needed! 
 
				AddUseItemCallback("", "key01", "doorroom01", "KeyOnDoor", true);
 AddUseItemCallback("", "key02", "doorroom02", "KeyOnDoor", true);
 
 they both call the same function
 
 |  |  
	| 06-19-2012, 03:41 PM |  |  
	
		| Watskeeee   Junior Member
 
 Posts: 8
 Threads: 3
 Joined: Jun 2012
 Reputation: 
0
 | 
			| RE: AddEntityCollideCallBack(): Support Needed! 
 
				 (06-19-2012, 03:32 PM)FastHunteR Wrote:  AddEntityCollideCallback("Player","RoomofSecretsArea","CollideRoomTwo","true", 1);true is inside ".
 Thanks, I dunno why I didn't predict that was the problem, tried everything other than that!     |  |  
	| 06-19-2012, 03:43 PM |  |  
	
		| Cruzore   Senior Member
 
 Posts: 301
 Threads: 2
 Joined: Jun 2012
 Reputation: 
37
 | 
			| RE: AddEntityCollideCallBack(): Support Needed! 
 
				 (06-19-2012, 03:41 PM)Rownbear Wrote:  AddUseItemCallback("", "key01", "doorroom01", "KeyOnDoor", true);
 AddUseItemCallback("", "key02", "doorroom02", "KeyOnDoor", true);
 
 they both call the same function
 Many functions for keys opening doors are short because you use the same function. That ain't a problem, as long as asEntity and asItem are used, which is wrong here too.
			 
				
(This post was last modified: 06-19-2012, 03:49 PM by Cruzore.)
 |  |  
	| 06-19-2012, 03:47 PM |  |  
	
		| SilentHideButFine   Member
 
 Posts: 156
 Threads: 38
 Joined: May 2012
 Reputation: 
6
 | 
			| RE: AddEntityCollideCallBack(): Support Needed! 
 
				void OnStart(){
 AddUseItemCallback("", "key01", "doorroom01", "KeyOnDoor", true);
 AddUseItemCallback("", "key02", "doorroom02", "KeyOnDoor1", true);
 AddEntityCollideCallback("Player","RoomofSecretsArea","CollideRoomTwo",true, 1);
 }
 
 void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
 {
 SetSwingDoorClosed("doorroom01", true, true);
 }
 
 
 void KeyOnDoor(string &in asItem, string &in asEntity)
 {
 SetSwingDoorLocked("doorroom01", false, true);
 PlaySoundAtEntity("", "unlock_door", "doorroom01", 0, false);
 RemoveItem("key01");
 }
 
 
 void keyfunc(string &in asEntity, string &in type)
 {
 SetEntityActive("servant_brute_1", true);
 StartPlayerLookAt("servant_brute_1", 15, 15, "");
 AddTimer("monstertimer", 2, "monstertimer");
 ShowEnemyPlayerPosition("servant_brute_1");
 
 }
 
 
 void monstertimer(string &in asTimer)
 {
 StopPlayerLookAt();
 }
 
 |  |  
	| 06-20-2012, 05:33 AM |  |  
	
		| Stepper321   Senior Member
 
 Posts: 263
 Threads: 26
 Joined: Nov 2011
 Reputation: 
8
 | 
			| RE: AddEntityCollideCallBack(): Support Needed! 
 
				No, you are doing it wrong again. Just. Put the same functions of Key 1 and Key 2. But then, instead of "doorroom01" put in asEntity. And at PlaySound instead of "doorroom01" you do asEntity and at RemoveItem asItem. This will make it remove the item that you used. Cause that's the String that it found. And the Entity too. If you don't know what the fuck I'm saying, read trough and see what I changed in your script. void OnStart(){AddUseItemCallback("", "key01", "doorroom01", "KeyOnDoor", true);
 AddUseItemCallback("", "key02", "doorroom02", "KeyOnDoor", true);
 AddEntityCollideCallback("Player","RoomofSecretsArea","CollideRoomTwo",true, 1);
 }
 
 void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
 {
 SetSwingDoorClosed("doorroom01", true, true);
 }
 
 
 void KeyOnDoor(string &in asItem, string &in asEntity)
 {
 SetSwingDoorLocked(asEntity, false, true);
 PlaySoundAtEntity("", "unlock_door", asEntity , 0, false);
 RemoveItem(asItem);
 }
 
 
 void keyfunc(string &in asEntity, string &in type)
 {
 SetEntityActive("servant_brute_1", true);
 StartPlayerLookAt("servant_brute_1", 15, 15, "");
 AddTimer("", 2, "monstertimer");
 ShowEnemyPlayerPosition("servant_brute_1");
 
 }
 
 
 void monstertimer(string &in asTimer)
 {
 StopPlayerLookAt();
 }
 
 
 Signature to awesome to be displayed. 
				
(This post was last modified: 06-20-2012, 04:29 PM by Stepper321.)
 |  |  
	| 06-20-2012, 04:28 PM |  |  |