Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved SetEntityPlayerLookAtCallback??
Author Message
Tripication Offline
Member

Posts: 172
Joined: Dec 2011
Reputation: 6
Post: #1
SetEntityPlayerLookAtCallback??
ok, how does this work.

If i were to have a player open the door and look at an object, how would i get the void for it??

this is what i have so far...
void OnStart()

{
SetEntityPlayerLookAtCallback("Tablescare", "TableScare", false);

}

void TableScare(string &in asEntity, int alState)
{

}




Im not sure if its right, now I want it so that when the player opens the door, and sees the StoneTable, i want him to freak out, then add a timer of 2 or 3 seconds, then force look at the door behind him, that is being bashed down by a grunt.


Now i know how to forcelook, give sanity damage and add timers and all that biz. But how would the script know what entity i have to look at out of this?
[font=Lucida Grande, Arial, Verdana, sans-serif]SetEntityPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt);[/font]
[font=Lucida Grande, Arial, Verdana, sans-serif]
[/font]
Plese help, this is driving me insane...

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
(This post was last modified: 01-10-2012 12:38 PM by Tripication.)
01-10-2012 11:19 AM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,237
Joined: Jul 2011
Reputation: 216
Post: #2
RE: SetEntityPlayerLookAtCallback??
(01-10-2012 11:19 AM)Tripication Wrote:  But how would the script know what entity i have to look at out of this?

By the first parameter, which is the name of the entity.

Tutorials: From Noob to Pro
01-10-2012 11:23 AM
Visit this user's website Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #3
RE: SetEntityPlayerLookAtCallback??
EDIT: Didn't read it right

(This post was last modified: 01-10-2012 11:26 AM by flamez3.)
01-10-2012 11:25 AM
Find all posts by this user Quote this message in a reply
Tripication Offline
Member

Posts: 172
Joined: Dec 2011
Reputation: 6
Post: #4
RE: SetEntityPlayerLookAtCallback??
(01-10-2012 11:23 AM)Your Computer Wrote:  
(01-10-2012 11:19 AM)Tripication Wrote:  But how would the script know what entity i have to look at out of this?

By the first parameter, which is the name of the entity.
Ohh really, i thought that meant Internal name. Thanks for the clear up

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
01-10-2012 11:41 AM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,237
Joined: Jul 2011
Reputation: 216
Post: #5
RE: SetEntityPlayerLookAtCallback??
(01-10-2012 11:41 AM)Tripication Wrote:  Ohh really, i thought that meant Internal name. Thanks for the clear up

There are a few things on that wiki article that needs updating. (I don't edit that page because the wiki editor is a bit buggy.)

Tutorials: From Noob to Pro
01-10-2012 11:45 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)