Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OnPlayerSpotted???
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#7
RE: OnPlayerSpotted???

Nice! I did it Wink Here is my script if anyone wants it!

What happens is that when i touch the door, the monster gets active, and when i walk in the door it gets player position, but only if the monster is in that room.


void OnStart()
{
SetEntityPlayerInteractCallback("door_teacher", "OnInteract", false);
AddEntityCollideCallback("player", "playercollide1", "IfMonsterCollide", true, 1);
}

void IfMonsterCollide(string &in asParent, string &in asChild, int alState)
{
GetEntitiesCollide("monsterteacher1", "monstercollide1");

if(true)
{
ShowEnemyPlayerPosition("monsterteacher1");
}
}

void OnInteract(string &in asEntity)
{
SetEntityActive("monster_teacher1", true);
AddEnemyPatrolNode("monster_teacher1", "PathNodeArea_1", 2, "");
}

Trying is the first step to success.
03-12-2012, 10:40 PM
Find


Messages In This Thread
OnPlayerSpotted??? - by FlawlessHappiness - 03-12-2012, 08:25 PM
RE: OnPlayerSpotted??? - by Your Computer - 03-12-2012, 08:32 PM
RE: OnPlayerSpotted??? - by Apjjm - 03-12-2012, 08:40 PM
RE: OnPlayerSpotted??? - by FlawlessHappiness - 03-12-2012, 09:47 PM
RE: OnPlayerSpotted??? - by SilentStriker - 03-12-2012, 10:18 PM
RE: OnPlayerSpotted??? - by Your Computer - 03-12-2012, 10:26 PM
RE: OnPlayerSpotted??? - by FlawlessHappiness - 03-12-2012, 10:40 PM



Users browsing this thread: 1 Guest(s)