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
SetEntityPlayerLookAtCallback??
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#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?
SetEntityPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt);

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
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#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
Website Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#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
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#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
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#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
Website Find




Users browsing this thread: 1 Guest(s)