Frictional Games Forum (read-only)
[SCRIPT] I need a help please - 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] I need a help please (/thread-25288.html)

Pages: 1 2 3


RE: I need a help please - Neelke - 05-15-2014

Eh, what? I seriously don't understand what you mean. If someone understand, please explain to me.


RE: I need a help please - Straxedix - 05-15-2014

to pick key and doors unlock without using that key understand me now :O :D ?


RE: I need a help please - Neelke - 05-15-2014

Yes.

But seriously, if this is the name of the door, this should work.

SetSwingDoorLocked("Door01", false, false);


RE: I need a help please - Straxedix - 05-15-2014

look

Spoiler below!
void OnStart()

{
AddEntityCollideCallback("Player", "CloseDoor", "CollideLockDoor", true, 1);
AddEntityCollideCallback("Player", "Area01", "LookBack01", true, 1);
SetEntityPlayerInteractCallback("Key01", "PickKey", true);
}

void LookBack01(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("Door01", 2, 25, "CallbackName");
AddTimer("", 3, "StopLookingAtDoor");
AddTimer("DoorDown", 3, "LockDoor");
}

void StopLookingAtDoor(string &in asTimer)
{
StopPlayerLookAt();
}

void LockDoor(string &in asTimer)
{
SetSwingDoorLocked("Door01", true, true);

PlaySoundAtEntity("bang", "scare_slam_door", "Door01", 0.0f, false);
StartScreenShake(0.09f, 2.0f, 0.7f, 1.5f);
}

void PickKey(string &in asEntity, string &in asType)
{
GiveSanityBoostSmall(); //Just a nice little sanity boost
SetSwingDoorLocked("Door01", false, true);
}

something is wrong,what :(


RE: I need a help please - Neelke - 05-15-2014

I can't find a problem. Sorry. Other than that the CollideLockDoor doesn't exist, I can't find any problems. It might be wrong name of the key.