Frictional Games Forum (read-only)

Full Version: Secret shelf and no music
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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.