Frictional Games Forum (read-only)
[SCRIPT] Can't stop shake and blur. - 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] Can't stop shake and blur. (/thread-11968.html)



Can't stop shake and blur. - z3akx - 12-20-2011

Hi.

Well basicaly i want the player to walk through a spot and then the screen starts shaking and a blur.
The player then needs to "drink" a medecinepot (laudanum) to stop the shaking. And ofc i can't get it to work..

Well here is what i have to far.


void OnStart()
{
SetEntityPlayerInteractCallback("medecine", "medecinepot", true);
}


void medecinepot(string &in asEntity)
{
StartScreenShake(0, 0.0f, 0, 0.0f);
FadeRadialBlurTo(0, 0.0f);
RemoveItem("medecine");
}

Please help :-D


RE: Can't stop shake and blur. - Kurton - 12-20-2011

Is the medicine in the player's inventory? use AddUseItemCallback instead.

(Then the callback syntax would be void medecinepot(string &in asItem, string &in asEntity) )


RE: Can't stop shake and blur. - z3akx - 12-20-2011

No the medecine is a item to pick up Wink


RE: Can't stop shake and blur. - z3akx - 12-21-2011

Okay i have it fixxed now.

I found out i just needed to add medecinepot on the medecine itself, in the CallBackFunc. Second tap..

But thanks for the help :-)