Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Door Open/Close Depending on Situation
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#11
RE: Door Open/Close Depending on Situation

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

09-18-2010, 11:35 PM
Find
Dismortal Offline
Junior Member

Posts: 10
Threads: 3
Joined: Sep 2010
Reputation: 0
#12
RE: Door Open/Close Depending on Situation

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.
09-21-2010, 04:20 AM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#13
RE: Door Open/Close Depending on Situation

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.
09-21-2010, 06:08 AM
Website Find
Rhaegar Offline
Junior Member

Posts: 1
Threads: 0
Joined: Sep 2010
Reputation: 0
#14
RE: Door Open/Close Depending on Situation

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
09-22-2010, 06:31 PM
Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#15
RE: Door Open/Close Depending on Situation

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

09-22-2010, 07:04 PM
Find




Users browsing this thread: 1 Guest(s)