Frictional Games Forum (read-only)

Full Version: Grabbable feather
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to make a monster disappear immediately upon looking away from it, but the only scripts I can find trigger a function when you look AT something instead. Is there a way to do this?

Also, I've tried making a pen_feather that you can grab and carry around, but when I pick it up it seems to spin around uncontrollably. What could be causing this?
SetEntityPlayerLookAtCallback.
Calls a function when the player looks at a certain entity.


Callback syntax: void MyFunc(string &in asEntity, int alState)


alState: 1 = looking, -1 = not looking




asName - internal name


asCallback - function to call


abRemoveWhenLookedAt - determines whether the callback should be removed when the player looked at the entity

So in the function called, do I put an "if(alState == -1)" in there? Or is it too late, with the function exectued as soon as you look at it and not able to do anything else?

Well I played with it and got it to work this way.

Still need some advice on picking up a feather without it spinning like a madman.