Frictional Games Forum (read-only)
Secret shelf and no music - 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)
+--- Thread: Secret shelf and no music (/thread-9958.html)



Secret shelf and no music - GoDl1Kelol - 08-24-2011

I figured both things out, so I wanna ask a third thing. I want to make a door burst open when you walk in an area. I saw the gust_door stuff from the first level of amnesia but I can't get it to work for some reason. Would appreciate it if someone wrote proper script for it to work


RE: Secret shelf and no music - Mr. Bombastic - 08-25-2011

Strange to say I also tried the gust door script from the first level on my map and it didn't work, i don't know why. But it's easy to replace!

This is the script i used for the door opening slowly:
Spoiler below!
void DoorOpenFunction(string &in asParent, string &in asChild, int alState)
{
AddTimer("Start1", 0.1f, "DoorOpenTimer");
AddTimer("Start2", 0.6f, "DoorOpenTimer");
AddTimer("Start3", 1.1f, "DoorOpenTimer");
AddTimer("Start4", 1.6f, "DoorOpenTimer");
AddTimer("Start5", 2.1f, "DoorOpenTimer");
AddTimer("Start6", 2.6f, "DoorOpenTimer");
}


void DoorOpenTimer(string &in asTimer)
{
if(asTimer == "Start1"){
AddPropImpulse("mansion_6", -0.2f, 0, -0.2f, "World");
}

if(asTimer == "Start2"){
AddPropImpulse("mansion_6", -0.3f, 0, -0.3f, "World");
}

if(asTimer == "Start3"){
AddPropImpulse("mansion_6", -0.3f, 0, -0.3f, "World");
}

if(asTimer == "Start4"){
AddPropImpulse("mansion_6", -0.2f, 0, -0.2f, "World");
}

if(asTimer == "Start5"){
AddPropImpulse("mansion_6", -0.1f, 0, -0.1f, "World");
}

if(asTimer == "Start5"){
AddPropImpulse("mansion_6", 0.1f, 0, 0.1f, "World");
}
}
I hope you know how to use the "AddPropImpulse" script.
X, Y and Z have to fit with the door in the level editor.

I hope this helped.