RE: How to isplays a text on the player's screen? 
			 
			
				Okay thank you.Where is your "Hint01" in the .lang file?  
ah ok.thanks 
It doesn't work.He says : "unexpected end of file" in row 120 
 
here is my script : 
void OnStart() 
{ 
     AddEntityCollideCallback("Player", "spider1", "spider1", true, 1); 
     AddEntityCollideCallback("Player", "spider2", "spider2", true, 1); 
     AddEntityCollideCallback("Player", "spider3", "spider3", true, 1); 
     AddEntityCollideCallback("Player", "hm", "hm", true, 1); 
     AddEntityCollideCallback("Player", "active", "active", true, 1); 
     AddEntityCollideCallback("Player", "ball", "ball", true, 1); 
     AddEntityCollideCallback("Player", "what", "what", true, 1); 
     AddUseItemCallback("", "string_pile_1", "cannon_1", "StringOnCannon", true); 
} 
 
 
void spider1(string &in asParent , string &in asChild , int alState) 
{ 
     PlaySoundAtEntity("", "spider_step.snt", "Player", 0, false); 
} 
 
void spider2(string &in asParent , string &in asChild , int alState) 
{ 
     PlaySoundAtEntity("Player", "spider_die.snt", "stone_med01_brown_1", 0, false); 
} 
 
void spider3(string &in asParent , string &in asChild , int alState) 
{ 
     PlaySoundAtEntity("", "spider_hurt.snt", "Player", 0, false); 
     PlaySoundAtEntity("", "roach_idle.snt", "Player", 0, false); 
} 
 
void hm(string &in asParent , string &in asChild , int alState) 
{ 
     SetEntityActive("spider_1", true); 
     SetEntityActive("spider_2", true); 
     PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false); 
     SetEntityActive("active", true); 
} 
 
 
void active(string &in asParent , string &in asChild , int alState) 
{ 
     SetEntityActive("spider_3", true); 
     SetEntityActive("spider_4", true); 
} 
 
void interact_ball(string &in asEntity) 
{ 
     SetEntityActive("ball", true); 
} 
 
 
void ball(string &in asParent , string &in asChild , int alState) 
{ 
     StartPlayerLookAt("look", 4.0, 1.0f, ""); 
     PlaySoundAtEntity("", "13_ignite.snt", "Player", 0, false); 
     AddTimer("Timer", 0.5f, "lol"); 
      
} 
 
void lol(string &in asTimer) 
{    
     StopPlayerLookAt(); 
} 
 
void StringOnCannon(string &in asItem, string &in asEntity)  
{ 
     StartPlayerLookAt("string_1", 2.0, 3.0f, ""); 
     PlaySoundAtEntity("", "12_make_drill.snt", "Player", 0, false); 
     AddTimer("Timer", 1.0f, "stop"); 
     RemoveItem(asItem); 
     SetEntityActive("candle_floor_3", true); 
     AddTimer("Timer", 1.0f, "boom"); 
} 
 
void stop(string &in asTimer) 
{ 
     StopPlayerLookAt(); 
} 
 
 
 
void boom(string &in asTimer) 
{ 
     PlaySoundAtEntity("", "12_epoxy_blow.snt", "Player", 0, false); 
     AddTimer("Timer", 3.0f, "boomdust"); 
} 
 
void boomdust(string &in asTimer) 
{ 
     CreateParticleSystemAtEntity("", "ps_break_pottery.ps", "look", false); 
     FadeLightTo("PointLight_4", 1.0f, 0.809f, 0.172f, 1.0f, -1.0f, 0.2f);  
     AddTimer("Timer", 0.5f, "fall"); 
     AddTimer("Timer", 0.2f, "light"); 
} 
 
void light(string &in asTimer) 
{ 
     FadeLightTo("PointLight_4", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 0.2f); 
} 
 
 
void fall(string &in asTimer) 
{ 
     SetEntityActive("prison_broken_1", true); 
     SetEntityActive("prison_3", false); 
     SetEntityActive("wooden_board03_5", true); 
     SetEntityActive("wooden_board03_6", true); 
     SetEntityActive("wooden_board03_3", true); 
     SetEntityActive("wooden_board03_4", true); 
     SetEntityActive("wooden_board03_7", true); 
     CreateParticleSystemAtEntity("", "ps_break_cavein.ps", "dust", false); 
     PlaySoundAtEntity("", "hit_wood.snt", "Player", 0, false); 
     PlaySoundAtEntity("", "break_wood.snt", "Player", 0, false); 
} 
 
 
void what(string &in asParent , string &in asChild , int alState) 
{ 
     SetMessage("Hints", "Hint01",  2.0f"); 
} 
			
			
			
			
				
(This post was last modified: 07-08-2011, 07:50 PM by Janni1234.)
 
				
			 
		 |