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
How do I make the player look at a certain spot?
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#4
RE: How do I make the player look at a certain spot?

As far as I'm aware, you can call a function when you pick something up with the EntityPlayerInteract.

Not sure if it works with notes, but worth a shot.

PHP Code: (Select All)
SetEntityPlayerInteractCallback(stringasNamestringasCallbackbool abRemoveOnInteraction); 

asName - internal name
asCallback - function to call
abRemoveOnInteraction - determines whether the callback should be removed when the player interacts with the entity

Here, the internal name would be what you've named the note in the editor.

Then you set the name of your function and use this syntax: void MyFunc(string &in asEntity) .

So if you want your player to look at something after he picked up the note, you could set a timer so he doesn't immediately go to look for what he's looking at, however, I'm pretty sure nothing can disturb you while you read notes, so I don't think it's a big deal to set a timer.

04-13-2014, 07:29 PM
Find


Messages In This Thread
RE: How do I make the player look at a certain spot? - by MsHannerBananer - 04-13-2014, 07:29 PM



Users browsing this thread: 1 Guest(s)