| trancedj   Member
 
 Posts: 60
 Threads: 7
 Joined: Sep 2010
 Reputation: 
0
 | 
			| script about monster and player 
 
				hello everyone!!I need some help and my question today is:
 
 I would like , When the monster sees the Player the level is over and the player must replay the map, with the message on screen like " don't let the monster see you to continue game."
 
 
 How could I do that?
 
 Thanks
 
				
(This post was last modified: 03-04-2012, 11:45 AM by trancedj.)
 |  | 
	| 03-04-2012, 11:43 AM |  | 
	
		| trancedj   Member
 
 Posts: 60
 Threads: 7
 Joined: Sep 2010
 Reputation: 
0
 | 
			| RE: script about monster and player 
 
				Hello!any help please?
 |  | 
	| 03-06-2012, 11:37 AM |  | 
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: script about monster and player 
 
				There isn't a function that allows you to detect if the monster has seen the player. 
			 
 |  | 
	| 03-06-2012, 11:41 PM |  | 
	
		| trancedj   Member
 
 Posts: 60
 Threads: 7
 Joined: Sep 2010
 Reputation: 
0
 | 
			| RE: script about monster and player 
 
				Oh nooo!! 
 |  | 
	| 03-07-2012, 10:06 AM |  | 
	
		| Shives   Member
 
 Posts: 154
 Threads: 41
 Joined: Jan 2012
 Reputation: 
1
 | 
			| RE: script about monster and player 
 
				I think you could do thisBut this just work if you script it when the Monster finds the player.
 With an Area
 
 void OnStart()
 {
 AddEntityCollideCallback("Player", "NameofArea", "Monster", true, 1);
 }
 void Monster(string &in asParent, string &in asChild, int alState)
 {
 ShowEnemyPlayerPosition("NameOfMonster");
 AddTimer("", 1, "Restart");
 }
 void Restart(string &in asTimer)
 {
 TeleportPlayer("NameOfPlayerStartArea");
 SetMessage("ShowMessage", "NameOfMessage", 5);
 }
 
 
 In the Language file the Category should look like this
 
 
 <CATEGORY Name="ShowMessage">
 <Entry Name="NameOfMessage">don't let the monster see you to continue game.</Entry>
 </CATEGORY>
 
 
 |  | 
	| 03-07-2012, 02:54 PM |  | 
	
		| flamez3   Posting Freak
 
 Posts: 1,281
 Threads: 48
 Joined: Apr 2011
 Reputation: 
57
 | 
			| RE: script about monster and player 
 
				^ If I'm not wrong, that makes the Enemy see the Player automatically.
			 
 |  | 
	| 03-07-2012, 03:30 PM |  | 
	
		| trancedj   Member
 
 Posts: 60
 Threads: 7
 Joined: Sep 2010
 Reputation: 
0
 | 
			| RE: script about monster and player 
 
				Hi, I try what you wrote but it does not work? how could the area collide when the monster see player?
			 |  | 
	| 03-08-2012, 11:10 PM |  |