Frictional Games Forum (read-only)

Full Version: SetEntityPlayerLookAtCallback??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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...
(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.
EDIT: Didn't read it right
(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
(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.)