Karai16   
 
 
		
			Member 
			
			
			
 
			
	Posts: 164 
	Threads: 24 
	Joined: Apr 2011
	
 Reputation: 
0  
		 
	 
	
		
			
RE: Callback help? 
  
			 
			
				 (05-13-2011, 09:59 PM) WatzUpzPeepz Wrote:   Yea here ya go: 
void OnStart() 
{ 
    AddUseItemCallback("", "crowbar_1", "door1", "KeyOnDoor", true); 
   AddUseItemCallback("", "key1", "door3", "KeyOnClosetDoor", true); 
  AddEntityCollideCallback("Player", "DoorSlamArea", "CollideDoorSlam", true, 1); 
  SetEntityPlayerInteractCallback("OfficeDoor", "InteractOfficeDoor", true);" 
  } 
 
void KeyOnDoor(string &in asItem, string &in asEntity) 
{ 
    SetSwingDoorLocked("door1", false, true); 
    PlaySoundAtEntity("", "break_wood.snt", "door1", 0.0f, true); 
} 
 
 
void KeyOnClosetDoor(string &in asItem, string &in asEntity) 
{ 
    SetSwingDoorLocked("door3", false, true); 
    PlaySoundAtEntity("", "unlock_door.snt", "door3", 0.0f, true); 
} 
 
void CollideDoorSlam(string &in asParent, string &in asChild, int alState) 
{	 
    StartPlayerLookAt("door3", 10, 50, "");  
	AddTimer("", 0.5f, "TimerSlamDoor"); 
	SetEntityActive("ParticleSystem_1" , true); 
} 
void TimerSlamDoor(string &in asTimer) 
{ 
	SetSwingDoorLocked("door2", true, true); 
	SetSwingDoorClosed("door3", true, true);     
    GiveSanityDamage(4.0f, true); 
    PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); 
	AddTimer("", 2.0f, "TimerStopLook"); 
                        SetEntityActive("armour2", true); 
                        SetEntityActive("armour1", false); 
} 
 
void TimerStopLook(string &in asTimer) 
{ 
StopPlayerLookAt(); 
} 
 
void InteractOfficeDoor (string &in asEntity) 
{ 
if(GetSwingDoorLocked("OfficeDoor")== true) 
{ 
  SetMessage("Map4", "OfficeDoorMessage", 5.0f); 
{ 
}
found it, there's a slight typo, here you go:
void OnStart() 
{ 
AddUseItemCallback("", "crowbar_1", "door1", "KeyOnDoor", true); 
AddUseItemCallback("", "key1", "door3", "KeyOnClosetDoor", true); 
AddEntityCollideCallback("Player", "DoorSlamArea", "CollideDoorSlam", true, 1); 
SetEntityPlayerInteractCallback("OfficeDoor", "InteractOfficeDoor", true);" 
} 
 
void KeyOnDoor(string &in asItem, string &in asEntity) 
{ 
SetSwingDoorLocked("door1", false, true); 
PlaySoundAtEntity("", "break_wood.snt", "door1", 0.0f, true); 
} 
 
 
void KeyOnClosetDoor(string &in asItem, string &in asEntity) 
{ 
    SetSwingDoorLocked("door3", false, true); 
    PlaySoundAtEntity("", "unlock_door.snt", "door3", 0.0f, true); 
} 
 
void CollideDoorSlam(string &in asParent, string &in asChild, int alState) 
{ 
    StartPlayerLookAt("door3", 10, 50, ""); 
    AddTimer("", 0.5f, "TimerSlamDoor"); 
    SetEntityActive("ParticleSystem_1" , true); 
} 
 
void TimerSlamDoor(string &in asTimer) 
{ 
    SetSwingDoorLocked("door2", true, true); 
    SetSwingDoorClosed("door3", true, true); 
    GiveSanityDamage(4.0f, true); 
    PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); 
    AddTimer("", 2.0f, "TimerStopLook"); 
    SetEntityActive("armour2", true); 
    SetEntityActive("armour1", false); 
} 
 
void TimerStopLook(string &in asTimer) 
{ 
    StopPlayerLookAt(); 
} 
 
void InteractOfficeDoor (string &in asEntity) 
{ 
    if(GetSwingDoorLocked("OfficeDoor")== true) 
    { 
        SetMessage("Map4", "OfficeDoorMessage", 5.0f); 
    } 
}
 
			 
			
			
 
Custom stories:  
Her Games (100% Complete) 
Her Games, All Bugs Fixed (100% Complete) 
			
		  
	
 
 
	05-13-2011, 10:04 PM   
	
		
	 
 
	
		 
		WatzUpzPeepz   
 
 
		
			Member 
			
			
			
 
			
	Posts: 106 
	Threads: 12 
	Joined: May 2011
	
 Reputation: 
0  
		 
	 
	
		
			
RE: Callback help? 
  
			 
			
				Thanks for trying but it still didn't work,oh well Its not that important.
			
			
			
 
			
		  
	
 
 
	05-13-2011, 10:19 PM   
	
		
	 
 
	
		 
		Karai16   
 
 
		
			Member 
			
			
			
 
			
	Posts: 164 
	Threads: 24 
	Joined: Apr 2011
	
 Reputation: 
0  
		 
	 
	
		
			
RE: Callback help? 
  
			 
			
				 (05-13-2011, 10:19 PM) WatzUpzPeepz Wrote:   Thanks for trying but it still didn't work,oh well Its not that important.
have you tried deleting the cache file before testing?
----
EDIT: Also, can you maybe give us a picture of the error you're getting?
			
 
			
			
 
Custom stories:  
Her Games (100% Complete) 
Her Games, All Bugs Fixed (100% Complete) 
			
				
(This post was last modified: 05-13-2011, 10:24 PM by Karai16 .) 
 
				
			 
		  
	
 
 
	05-13-2011, 10:21 PM   
	
		
	 
 
	
		 
		WatzUpzPeepz   
 
 
		
			Member 
			
			
			
 
			
	Posts: 106 
	Threads: 12 
	Joined: May 2011
	
 Reputation: 
0  
		 
	 
	
		
			
RE: Callback help? 
  
			 
			
				Epic noob moment comming.....whats that? 
 
Here is that error report I keep getting
			
 
			
 
 
Attached Files  
 
 
  Capture.JPG  (Size: 24.14 KB / Downloads: 262)
 
			
 
			
				
(This post was last modified: 05-13-2011, 10:29 PM by WatzUpzPeepz .) 
 
				
			 
		  
	
 
 
	05-13-2011, 10:25 PM   
	
		
	 
 
	
		 
		Karai16   
 
 
		
			Member 
			
			
			
 
			
	Posts: 164 
	Threads: 24 
	Joined: Apr 2011
	
 Reputation: 
0  
		 
	 
	
		
			
RE: Callback help? 
  
			 
			
				 (05-13-2011, 10:25 PM) WatzUpzPeepz Wrote:   Epic noob moment comming.....whats that? 
go to the folder with all your custom story files (map_name.hps, map_name.map etc) if there's a map_name.cache file there, delete it, then try testing out the code again
If that isn't working, give us a picture of the error you're getting... not to sound all serious and all, but it's personal now... 
 I'm not letting a computer win any argument whatsoever!
			
 
			
			
 
Custom stories:  
Her Games (100% Complete) 
Her Games, All Bugs Fixed (100% Complete) 
			
				
(This post was last modified: 05-13-2011, 10:29 PM by Karai16 .) 
 
				
			 
		  
	
 
 
	05-13-2011, 10:28 PM   
	
		
	 
 
	
		 
		WatzUpzPeepz   
 
 
		
			Member 
			
			
			
 
			
	Posts: 106 
	Threads: 12 
	Joined: May 2011
	
 Reputation: 
0  
		 
	 
	
		
			
RE: Callback help? 
  
			 
			
				No cache file but I got the picture you asked for.
			
			
			
 
			
		  
	
 
 
	05-13-2011, 10:30 PM   
	
		
	 
 
	
		 
		Karai16   
 
 
		
			Member 
			
			
			
 
			
	Posts: 164 
	Threads: 24 
	Joined: Apr 2011
	
 Reputation: 
0  
		 
	 
	
		
			
RE: Callback help? 
  
			 
			
				 (05-13-2011, 10:30 PM) WatzUpzPeepz Wrote:   No cache file but I got the picture you asked for.
hmm, and you already tried deleting everything in your hps file, and replace it with the code I gave you?
			
 
			
			
 
Custom stories:  
Her Games (100% Complete) 
Her Games, All Bugs Fixed (100% Complete) 
			
		  
	
 
 
	05-13-2011, 10:39 PM   
	
		
	 
 
	
		 
		Roenlond   
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 331 
	Threads: 3 
	Joined: Apr 2011
	
 Reputation: 
0  
		 
	 
	
		
			
RE: Callback help? 
  
			 
			
				void OnStart() 
{ 
AddUseItemCallback("", "crowbar_1", "door1", "KeyOnDoor", true); 
AddUseItemCallback("", "key1", "door3", "KeyOnClosetDoor", true); 
AddEntityCollideCallback("Player", "DoorSlamArea", "CollideDoorSlam", true, 1); 
SetEntityPlayerInteractCallback("OfficeDoor", "InteractOfficeDoor", true); 
} 
 
void KeyOnDoor(string &in asItem, string &in asEntity) 
{ 
SetSwingDoorLocked("door1", false, true); 
PlaySoundAtEntity("", "break_wood.snt", "door1", 0.0f, true); 
} 
 
 
void KeyOnClosetDoor(string &in asItem, string &in asEntity) 
{ 
    SetSwingDoorLocked("door3", false, true); 
    PlaySoundAtEntity("", "unlock_door.snt", "door3", 0.0f, true); 
} 
 
void CollideDoorSlam(string &in asParent, string &in asChild, int alState) 
{ 
    StartPlayerLookAt("door3", 10, 50, ""); 
    AddTimer("", 0.5f, "TimerSlamDoor"); 
    SetEntityActive("ParticleSystem_1" , true); 
} 
 
void TimerSlamDoor(string &in asTimer) 
{ 
    SetSwingDoorLocked("door2", true, true); 
    SetSwingDoorClosed("door3", true, true); 
    GiveSanityDamage(4.0f, true); 
    PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); 
    AddTimer("", 2.0f, "TimerStopLook"); 
    SetEntityActive("armour2", true); 
    SetEntityActive("armour1", false); 
} 
 
void TimerStopLook(string &in asTimer) 
{ 
    StopPlayerLookAt(); 
} 
 
void InteractOfficeDoor (string &in asEntity) 
{ 
    if(GetSwingDoorLocked("OfficeDoor")== true) 
    { 
        SetMessage("Map4", "OfficeDoorMessage", 5.0f); 
    } 
}
Try that, there was a bad quotation mark in there 
 
			 
			
			
			
				
(This post was last modified: 05-13-2011, 10:48 PM by Roenlond .) 
 
				
			 
		  
	
 
 
	05-13-2011, 10:48 PM   
	
		
	 
 
	
		 
		Karai16   
 
 
		
			Member 
			
			
			
 
			
	Posts: 164 
	Threads: 24 
	Joined: Apr 2011
	
 Reputation: 
0  
		 
	 
	
		
			
RE: Callback help? 
  
			 
			
				You're right! I see it! That should put an end to your trouble!
			
			
			
 
Custom stories:  
Her Games (100% Complete) 
Her Games, All Bugs Fixed (100% Complete) 
			
		  
	
 
 
	05-13-2011, 10:55 PM   
	
		
	 
 
	
		 
		WatzUpzPeepz   
 
 
		
			Member 
			
			
			
 
			
	Posts: 106 
	Threads: 12 
	Joined: May 2011
	
 Reputation: 
0  
		 
	 
	
		
			
RE: Callback help? 
  
			 
			
				Oh lord that has made it even worse,now it crashes at the ( on the voidOnStart.
 
 (05-13-2011, 10:39 PM) Karai16 Wrote:   (05-13-2011, 10:30 PM) WatzUpzPeepz Wrote:   No cache file but I got the picture you asked for. 
hmm, and you already tried deleting everything in your hps file, and replace it with the code I gave you?
Yes
 now that I removed the extra " its now crashing at the voidOnStart
I'd like to thank all of you for helping me to get this troublesum script under control
			
 
			
			
 
			
				
(This post was last modified: 05-14-2011, 10:47 AM by WatzUpzPeepz .) 
 
				
			 
		  
	
 
 
	05-14-2011, 10:43 AM