Frictional Games Forum (read-only)

Full Version: Interact scare help.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do i make it so that when my guy opens a cabinet and sees whats in it he gets scared?
Use the search function, 'scare' has been asked often enough.

-> http://www.frictionalgames.com/forum/search.php
(03-25-2011, 01:37 AM)Pandemoneus Wrote: [ -> ]Use the search function, 'scare' has been asked often enough.

-> http://www.frictionalgames.com/forum/search.php

I cant find anything
You would use the script function: SetEntityPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt);

The syntax for the function it calls is: MyFunc(string &in entity, int alState) state: 1=looking, -1=not looking

You'd then put whatever you want him to do in that function.
Thanks Very much
(03-25-2011, 05:29 AM)MrBigzy Wrote: [ -> ]You would use the script function: SetEntityPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt);

The syntax for the function it calls is: MyFunc(string &in entity, int alState) state: 1=looking, -1=not looking

You'd then put whatever you want him to do in that function.

How do i do that, where do i put them on my script? both on the OnStart or what?

AND do i need to add a script to my level for it to work?