Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
script about monster and player
Author Message
trancedj Offline
Member

Posts: 60
Joined: Sep 2010
Reputation: 0
Post: #1
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
Find all posts by this user Quote this message in a reply
trancedj Offline
Member

Posts: 60
Joined: Sep 2010
Reputation: 0
Post: #2
RE: script about monster and player
Hello!
any help please?
03-06-2012 11:37 AM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,268
Joined: Jul 2011
Reputation: 223
Post: #3
RE: script about monster and player
There isn't a function that allows you to detect if the monster has seen the player.

Tutorials: From Noob to Pro
03-06-2012 11:41 PM
Visit this user's website Find all posts by this user Quote this message in a reply
trancedj Offline
Member

Posts: 60
Joined: Sep 2010
Reputation: 0
Post: #4
RE: script about monster and player
Oh nooo!!
03-07-2012 10:06 AM
Find all posts by this user Quote this message in a reply
Shives Offline
Member

Posts: 154
Joined: Jan 2012
Reputation: 1
Post: #5
RE: script about monster and player
I think you could do this
But 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>

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


03-07-2012 02:54 PM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,319
Joined: Apr 2011
Reputation: 57
Post: #6
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
Find all posts by this user Quote this message in a reply
trancedj Offline
Member

Posts: 60
Joined: Sep 2010
Reputation: 0
Post: #7
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
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)