Frictional Games Forum (read-only)
Door Open/Close Depending on Situation - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Door Open/Close Depending on Situation (/thread-4509.html)

Pages: 1 2


RE: Door Open/Close Depending on Situation - Pandemoneus - 09-18-2010

Played a bit around and found out this helped (instead of AddPropForce):
Code:
AddPropImpulse("castle_1", 1, 0, 0, "World");



RE: Door Open/Close Depending on Situation - Dismortal - 09-21-2010

Hey, i got the same problem with open the door. I tried to make a door like the gust door in the map 00_rainy_hall.

The Script:
Quote:void CollideAreaGustDoor(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(0.003f,0.25f, 1,1);

PlaySoundAtEntity("gust_door", "general_wind_whirl.snt", "door_gust", 1.0 / 3, false);

SetSwingDoorClosed("door_gust", false, false);
SetSwingDoorDisableAutoClose("door_gust", true);

GiveSanityDamage(5, true);

PlaySoundAtEntity("scare", "react_scare.snt", "Player", 0, false);

}

/////////////
////On Start
/////////////

void OnStart()
{
AddEntityCollideCallback("Player", "gustdoor", "CollideAreaGustDoor", true, 1);
}

This is without the partical effect. The sounds and the effects working fine but the door dont move. I studied the orginal script, the original map in the mapeditor and some posts about doors. Without success.


RE: Door Open/Close Depending on Situation - jens - 09-21-2010

You have to push the door with a force or an impulse, as is talked about earlier in the thread. As Pandemoneus says in the post before yours AddPropImpulse("castle_1", 1, 0, 0, "World");

To get the best effect of something creaking open you will probably have to use timers so that you give a repeating smaller push, instead of one big push.


RE: Door Open/Close Depending on Situation - Rhaegar - 09-22-2010

Hi

Im going to try to speak correctly...

Where do you have to create the script? Do you have to create some many of text document and call it with some name?

Thanks


RE: Door Open/Close Depending on Situation - Pandemoneus - 09-22-2010

You have to create a new text document and rename it to YourMapName.hps
Replace YourMapName with the same name of your level file without the extension so you have MyMap.map and MyMap.hps