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
Script - Force Player to Look in Direction
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#2
RE: Script - Force Player to Look in Direction

void LookAtGrunt(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("ghostgrunt", true);
    ShowEnemyPlayerPosition("ghostgrunt");
    AddTimer("", 2, "TimerGruntEnd");
   StartPlayerLookAt("MonsterName", 10, 50, "");
   AddTimer("", 2, "TimerStopPlayerLook");
}

void TimerStopPlayerLook (string &in asTimer)
{
StopPlayerLookAt();
}

void StartPlayerLookAt(string& asEntityName, float afSpeedMul, float afMaxSpeed, string& asAtTargetCallback);
void StopPlayerLookAt();

Forces the player to look at a certain entity until StopPlayerLookAt is used.

asEntityName - the entity to look at
afSpeedMul - how fast should the player look at the entity
afMaxSpeed - maximum speed allowed
asAtTargetCallback - function to call when player looks at target

[Image: 44917299.jpg]Dubstep <3
07-20-2011, 09:30 PM
Find


Messages In This Thread
RE: Script - Force Player to Look in Direction - by xtron - 07-20-2011, 09:30 PM



Users browsing this thread: 1 Guest(s)