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 Help StartPlayerLookAt Help
.Paradox Offline
Junior Member

Posts: 2
Threads: 1
Joined: Mar 2012
Reputation: 0
#1
StartPlayerLookAt Help

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
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.
03-26-2012, 02:07 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: StartPlayerLookAt Help

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.

03-26-2012, 07:17 AM
Find
.Paradox Offline
Junior Member

Posts: 2
Threads: 1
Joined: Mar 2012
Reputation: 0
#3
RE: StartPlayerLookAt Help

Ah, thanks. But is it at all possible to allow the player to walk around, but not look around?
03-26-2012, 10:04 PM
Find
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#4
RE: StartPlayerLookAt Help

Of course...
If you use StartPlayerLookAt it doesn't stop the player from functioning, only it's mouse controll.
03-26-2012, 10:14 PM
Find




Users browsing this thread: 1 Guest(s)