Frictional Games Forum (read-only)
[SCRIPT] PlayerLookAt? - 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: [SCRIPT] PlayerLookAt? (/thread-12938.html)



PlayerLookAt? - Tripication - 01-29-2012

Is there anyway to sort this out so that the feild of view resets when the player doesn't look at PlayerLookAt?



void OnStart()
{
SetEntityPlayerLookAtCallback("PlayerLookAt", "FlipOut", false);
}

void FlipOut(string &in asEntity, int alState)
{
FadeRadialBlurTo(0.1f, 2);
}

Sorry about this, i've just realized i created a new thread when i still had one active about nearly the same thing :S


RE: PlayerLookAt? - Dobbydoo - 01-29-2012

PHP Code:
void OnStart()
 {
 
SetEntityPlayerLookAtCallback("PlayerLookAt""FlipOut"false);
 }
 
 
void FlipOut(string &in asEntityint alState)
 {
//If looking
if(alState == 1)
{
 
FadeRadialBlurTo(0.1f2);
}
 
//If not looking
if(alState == -1)
 {
   
FadeRadialBlurTo(0.0f0);
 }


I think this should work Smile



RE: PlayerLookAt? - Tripication - 01-29-2012

Hmm, that didnt seem to work either. It sets it, but wont unset it when i look away, although i think i may have just thought of a way to do it with variables. I'll test tomorrow, thanks for the help thoSmile