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
Making the player look at something?
Eyeball27 Offline
Junior Member

Posts: 13
Threads: 3
Joined: Nov 2010
Reputation: 0
#5
RE: Making the player look at something?

(11-28-2010, 09:12 AM)Hooumeri Wrote: Hey.this is the script

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

string& asEntityName = Where you want the player to look at, the name of the entity/area.

float afSpeedMul = The speed at which the player looks at the entity/area (I guess)

float afMaxSpeed = The max speed it will use ( I guess)

You can leave the targetcallback empty if you want(remember "")

anyways, here I have a working script. If you want the player to look faster, just mess up with the time values.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void Lookatdoor(string &in asTimer)
{
if(asTimer == "Lookatdoor_01")
{
StartPlayerLookAt("castle_1",2.0f,5.0f,"");
AddTimer("Lookatdoor_02",1.5f,"Lookatdoor");
}

if(asTimer == "Lookatdoor_02")
{
StopPlayerLookAt();
}
}

What happens here, is that my player looks at the door (castle_1) and after 1.5 seconds, the player can freely look around.

Hope this helped! Wink

Thanks you! That helped quite a bit.
11-28-2010, 09:09 PM
Find


Messages In This Thread
RE: Making the player look at something? - by Eyeball27 - 11-28-2010, 09:09 PM



Users browsing this thread: 1 Guest(s)