7thProductions 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 42 
	Threads: 17 
	Joined: Mar 2012
	
 Reputation: 
0
		
	 | 
	
		
			
  
is there any reason why 'SetMessage' isn't working? 
			 
			
				I've tried (almost) everything to get 'SetMessage' to work but no matter what I do; everytime I lanuch my map said message does not show up and I don't know what to do... 
 
I recall someone saying that there doesn't have to be something with the HPS file for this to happen, but that there could be something with the LANG file, but I don't see anything wrong with either... 
 
script: 
 
//////////////////////////// 
// Run first time starting map 
void OnStart() 
{  
SetPlayerCrouching(true); 
SetPlayerActive(false); 
ShowPlayerCrossHairIcons(false); 
SetSanityDrainDisabled(true); 
SetPlayerHealth(10.0); 
AddPlayerBodyForce(0, 0, -10000, true);  
FadeOut(0.0f); 
FadeIn(5.0f); 
SetPlayerSanity(1); 
AddTimer("T1", 3, "Intro"); 
AddTimer("T2", 6, "Intro"); 
AddTimer("T3", 8, "Intro"); 
AddTimer("T4", 10, "Intro");  
AddTimer("T5", 12, "Intro"); 
AddEntityCollideCallback("Player", "violetedwardsspeak1_blood", "Collidevioletedwardsspeak1blood", false, 1); 
} 
void Intro(string &in asTimer) 
{ 
string x = asTimer; 
if (x == "T1") 
{ 
PlaySoundAtEntity("", "react_sigh.snt", "Player", 0, false); 
FadeOut(3); 
} 
else if (x == "T2") 
{ 
FadeIn(3); 
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false); 
StartPlayerLookAt("ScriptArea_1", 2, 2, "");  
} 
else if (x == "T3") 
{ 
StopPlayerLookAt(); 
StartPlayerLookAt("ScriptArea_2", 2, 2, ""); 
} 
else if (x == "T4")  
{ 
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); 
StopPlayerLookAt(); 
} 
else if (x == "T5") 
{ 
SetPlayerCrouching(false); 
SetPlayerActive(true); 
ShowPlayerCrossHairIcons(true); 
SetPlayerMoveSpeedMul(0.3); 
SetPlayerJumpDisabled(true); 
SetPlayerCrouchDisabled(true); 
SetPlayerRunSpeedMul(0.0); 
AddTimer("startplayerlookat", 3, "Collidevioletedwardsspeak1blood"); 
AddTimer("setmessage", 3, "Collidevioletedwardsspeak1blood"); 
} 
} 
void Collidevioletedwardsspeak1blood(string &in asTimer)  
{ 
string x = asTimer; 
if (x == "startplayerlookat") 
{ 
SetPlayerActive(false); 
ShowPlayerCrossHairIcons(false); 
StartPlayerLookAt("blood_spatter01_1", 1, 10, ""); 
PlaySoundAtEntity("", "react_scare.ent", "Player", 0, false); 
} 
else if (x == "setmessage") 
{ 
SetMessage("Messages", "blood", 0); 
} 
 
} 
//////////////////////////// 
// Run when entering map 
void OnEnter() 
{ 
 
} 
 
//////////////////////////// 
// Run when leaving map 
void OnLeave() 
{ 
} 
 
extra_english.lang: 
 
<LANGUAGE> 
 
<RESOURCES /> 
 
<CATEGORY Name="CustomStoryMain"> 
<Entry Name="Description">YOUR DESCRIPTION HERE</Entry> 
 
</CATEGORY> 
 
<CATEGORY Name="Inventory" /> 
 
<CATEGORY Name="Messages" /> 
<Entry Name="blood">Violet:[br]Is...is that my blood...?[br]What the fuck happened to me!?!</Entry> 
</CATEGORY> 
 
<CATEGORY Name="Descriptions" /> 
 
<CATEGORY Name="Levels" /> 
</LANGUAGE> 
 
			 
			
			
			
				
(This post was last modified: 03-24-2012, 05:07 PM by 7thProductions.)
 
				
			 
		 |  
	 
 | 
 
	| 03-24-2012, 05:06 PM  | 
	
		
	 | 
 
 
	
		
		TheKataKombs 
 
 
		
			Member 
			
			
			
 
			
	Posts: 50 
	Threads: 7 
	Joined: Nov 2010
	
 Reputation: 
0
		
	 | 
	
		
			
RE: is there any reason why 'SetMessage' isn't working? 
			 
			
				SetMessage("Messages", "blood", 0); 
u have to take away the 0 and put in seconds how long you want it to stay on the screen.. 
 Like: SetMessage("Messages, "blood", 2.5); 
 Hope this helps    
			 
			
			
 
			
		 |  
	 
 | 
 
	| 03-24-2012, 05:12 PM  | 
	
		
	 | 
 
 
	
		
		ClayPigeon 
 
 
		
			Member 
			
			
			
 
			
	Posts: 214 
	Threads: 13 
	Joined: Mar 2012
	
 Reputation: 
8
		
	 | 
	
		
			
RE: is there any reason why 'SetMessage' isn't working? 
			 
			
				TeKataKombs - Actually, 0 will force a calculation of the number of the characters and according to it will set a matching amount of time to read the message. 
 
Thread opener: 
 
The problem's within your language file. 
Firstly, you did not end your Inventory category, make it like this: 
 
<CATEGORY Name="Inventory"> 
</CATEGORY> 
 
And then: 
<CATEGORY Name="Messages"> 
</CATEGORY> 
 
Your syntax was: <CATEGORY/>, which is false.
			 
			
			
			
		 |  
	 
 | 
 
	| 03-24-2012, 05:18 PM  | 
	
		
	 | 
 
 
	
		
		7thProductions 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 42 
	Threads: 17 
	Joined: Mar 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: is there any reason why 'SetMessage' isn't working? 
			 
			
				 (03-24-2012, 05:12 PM)TheKataKombs Wrote:  SetMessage("Messages", "blood", 0); 
 
 
u have to take away the 0 and put in seconds how long you want it to stay on the screen..Like: SetMessage("Messages, "blood", 2.5); Hope this helps    it didn't do anything... :[
			  
			
			
			
		 |  
	 
 | 
 
	| 03-24-2012, 05:19 PM  | 
	
		
	 | 
 
 
	
		
		ClayPigeon 
 
 
		
			Member 
			
			
			
 
			
	Posts: 214 
	Threads: 13 
	Joined: Mar 2012
	
 Reputation: 
8
		
	 | 
	
		
			
RE: is there any reason why 'SetMessage' isn't working? 
			 
			
				 (03-24-2012, 05:19 PM)7thProductions Wrote:   (03-24-2012, 05:12 PM)TheKataKombs Wrote:  SetMessage("Messages", "blood", 0); 
 
 
u have to take away the 0 and put in seconds how long you want it to stay on the screen..Like: SetMessage("Messages, "blood", 2.5); Hope this helps    it didn't do anything... :[ Please, try my solution. 
			  
			
			
			
		 |  
	 
 | 
 
	| 03-24-2012, 05:21 PM  | 
	
		
	 | 
 
 
	
		
		Unearthlybrutal 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 775 
	Threads: 12 
	Joined: May 2011
	
 Reputation: 
26
		
	 | 
	
		
			
RE: is there any reason why 'SetMessage' isn't working? 
			 
			
				The problem is what ClayPigeon said. 
  You can use this in your .lang file:
 
			 
			
			
 
			
		 |  
	 
 | 
 
	| 03-24-2012, 05:29 PM  | 
	
		
	 | 
 
 
	
		
		7thProductions 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 42 
	Threads: 17 
	Joined: Mar 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: is there any reason why 'SetMessage' isn't working? 
			 
			
				 (03-24-2012, 05:18 PM)ClayPigeon Wrote:  TeKataKombs - Actually, 0 will force a calculation of the number of the characters and according to it will set a matching amount of time to read the message. 
 
Thread opener: 
 
The problem's within your language file. 
Firstly, you did not end your Inventory category, make it like this: 
 
<CATEGORY Name="Inventory"> 
</CATEGORY> 
 
And then: 
<CATEGORY Name="Messages"> 
</CATEGORY> 
 
Your syntax was: <CATEGORY/>, which is false. 
okay, I did what you told me to do, but the message still won't show up on the screen
			  
			
			
			
		 |  
	 
 | 
 
	| 03-24-2012, 05:30 PM  | 
	
		
	 | 
 
 
	
		
		ClayPigeon 
 
 
		
			Member 
			
			
			
 
			
	Posts: 214 
	Threads: 13 
	Joined: Mar 2012
	
 Reputation: 
8
		
	 | 
	
		
			
RE: is there any reason why 'SetMessage' isn't working? 
			 
			
				 (03-24-2012, 05:30 PM)7thProductions Wrote:   (03-24-2012, 05:18 PM)ClayPigeon Wrote:  TeKataKombs - Actually, 0 will force a calculation of the number of the characters and according to it will set a matching amount of time to read the message. 
 
Thread opener: 
 
The problem's within your language file. 
Firstly, you did not end your Inventory category, make it like this: 
 
 
 
 
And then: 
 
 
 
Your syntax was: , which is false.  
okay, I did what you told me to do, but the message still won't show up on the screen 
Try using Unreathlybrutal's syntax, it seems correct.
			  
			
			
			
		 |  
	 
 | 
 
	| 03-24-2012, 05:33 PM  | 
	
		
	 | 
 
 
	
		
		Unearthlybrutal 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 775 
	Threads: 12 
	Joined: May 2011
	
 Reputation: 
26
		
	 | 
	
		
			
RE: is there any reason why 'SetMessage' isn't working? 
			 
			
				...just copy the code from my previous post...
			 
			
			
 
			
		 |  
	 
 | 
 
	| 03-24-2012, 05:33 PM  | 
	
		
	 | 
 
 
	
		
		7thProductions 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 42 
	Threads: 17 
	Joined: Mar 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: is there any reason why 'SetMessage' isn't working? 
			 
			
				 (03-24-2012, 05:33 PM)Unearthlybrutal Wrote:  ...just copy the code from my previous post... 
still nothing... 
			  
			
			
			
		 |  
	 
 | 
 
	| 03-24-2012, 06:41 PM  | 
	
		
	 | 
 
 
	 
 |