Frictional Games Forum (read-only)

Full Version: StartPlayerLookAt Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey everyone. I've searched a bit and didn't find what I wanted, all of the StartPlayerLookAt threads didn't show this. I vaguely remember seeing something about it earlier, but I lost it >_> I basically want the player to look at a monster, but I want it to be sharp. The vision jiggles around when it looks at the entity, and then it stops. I want it to stop as soon as it looks at the entity. (note_appear_scare is the grunt)

The player can also look around, and then it goes back to the entity, jiggling again. I don't want that.

Here's my script
Code:
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("note_appear_scare", true);
ShowEnemyPlayerPosition("note_appear_scare");
StartPlayerLookAt("note_appear_scare", 10.0f, 35.0f, "");
AddTimer("", 1.0f, "stoplookatgrunt");
}

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

Help please. I don't even know what to add to make it sharp.
If you make the movement too fast, you'll get that "jiggle" you're referring to. Slow it down. Also, to prevent the player from looking around, use SetPlayerActive(false); -- but make sure you reactivate them later so they can move again.
Ah, thanks. But is it at all possible to allow the player to walk around, but not look around?
Of course...
If you use StartPlayerLookAt it doesn't stop the player from functioning, only it's mouse controll.