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
Force player to follow enemy until it disappear help.
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#5
RE: Force player to follow enemy until it disappear help.

(07-21-2013, 05:56 PM)goregrinder99 Wrote:
(07-21-2013, 05:46 PM)ClayPigeon Wrote:
void OnStart()
{    
    AddEntityCollideCallback("MonsterEntity", "Area", "StopLook", false, 1);
}

void OnMonsterSpawns // Change this to whenever the enemy spawns
{    
    StartPlayerLookAt("MonsterEntity", 1.0f, 1.5f, "LookedAt");
}

void LookedAt()
{    
    StartPlayerLookAt("MonsterEntity", 1.0f, 1.0f, "LookedAt");
}

void StopLook(string &in par, string &in chi, int state)
{  
    StopPlayerLookAt();
}

So, where do I put what exactly? I'm assuming "MonsterEntity" is the monster name, what do I put in for "Area", "StopLook, and "LookedAt"?

The code that is under OnMonsterSpawns - You said that the monster spawns when the player interacts with a certain entity.
That means, that there is a callback for that interaction. Put the line there.

What's in OnStart - Just paste it in your OnStart callback.

The other ones - Paste them anywhere in your script OUTSIDE any callback.
MonsterEntity is the name of the monster indeed, and the Area is the Script Area the the monster collides with in order to dissapear, which will stop the looking session.
07-21-2013, 06:09 PM
Find


Messages In This Thread
RE: Force player to follow enemy until it disappear help. - by ClayPigeon - 07-21-2013, 06:09 PM



Users browsing this thread: 1 Guest(s)