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
enemy dissapear after looking at him?
39Games Offline
Junior Member

Posts: 48
Threads: 14
Joined: Jan 2013
Reputation: 0
#1
enemy dissapear after looking at him?

I want to save a scare in my custom story that has an enemy, when you look at it, a few seconds later it dissapears, what would the code be? I have not worked with if looking/not looking or what ever it is...

06-11-2013, 10:42 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: enemy dissapear after looking at him?

I will give you a few lines to work with. Lets see if you can figure it out Smile

SetEntityPlayerLookAtCallback("", "EnemyLookAtDisappear", false);

void EnemyLookAtDisappear(string &in asEntity, int alState)
{
if(alState == 1)
{

}

if(alState == -1)
{

}
}

AddTimer("EnemyDisappearTimer", 2, "EnemyDisappearTimer");

RemoveTimer("EnemyDisappearTimer");

SetEntityActive("Enemy", false);

void EnemyDisappearTimer(string &in asTimer)
{

}

Also, this should've been posted in Development support.
http://www.frictionalgames.com/forum/forum-39.html

Remember that next time

Trying is the first step to success.
(This post was last modified: 06-11-2013, 10:52 AM by FlawlessHappiness.)
06-11-2013, 10:49 AM
Find
39Games Offline
Junior Member

Posts: 48
Threads: 14
Joined: Jan 2013
Reputation: 0
#3
RE: enemy dissapear after looking at him?

Works mate, thanks!

(This post was last modified: 06-11-2013, 11:13 AM by 39Games.)
06-11-2013, 11:09 AM
Find




Users browsing this thread: 2 Guest(s)