Frictional Games Forum (read-only)
SetEntityPlayerLookAtCallback?? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: SetEntityPlayerLookAtCallback?? (/thread-12509.html)



SetEntityPlayerLookAtCallback?? - Tripication - 01-10-2012

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...



RE: SetEntityPlayerLookAtCallback?? - Your Computer - 01-10-2012

(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.


RE: SetEntityPlayerLookAtCallback?? - flamez3 - 01-10-2012

EDIT: Didn't read it right


RE: SetEntityPlayerLookAtCallback?? - Tripication - 01-10-2012

(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


RE: SetEntityPlayerLookAtCallback?? - Your Computer - 01-10-2012

(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.)