Frictional Games Forum (read-only)
Door Force Won't Open Door! - 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: Door Force Won't Open Door! (/thread-11123.html)



Door Force Won't Open Door! - Statyk - 11-02-2011

Okay... So everyone makes maps with a door that swings open on it's own.
and I need that in my map... But for some reason that I can CEASE to
understand is that the door DOES NOT OPEN on its own. It pushes out for a
moment but shoots RIGHT BACK to the closed position, no matter how high
I put the coordinate values. I used the wiki, other scripts, and it's
failing to do as it is told. Coulc someone for the life of me, tell me
what the fack I am doing wrong? My script:

//____________________________________
void OnStart()
{
AddEntityCollideCallback("Player", "OpenDoor", "pushdoor", true, 1);
}
void pushdoor(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("Dog_door", false, true);
SetSwingDoorDisableAutoClose("Dog_door", true);
AddPropForce("Dog_door", 0, 0, 15000, "world");
}
//____________________________________



RE: Door Force Won't Open Door! - Your Computer - 11-02-2011

Try disabling the autoclose before you try to open the door with SetSwingDoorClosed.


RE: Door Force Won't Open Door! - Statyk - 11-02-2011

(11-02-2011, 12:33 AM)Your Computer Wrote: Try disabling the autoclose before you try to open the door with SetSwingDoorClosed.
Did that AND deleted the doorframe. It's still not working. It's like the door is getting caught on itself... This script has NEVER wanted to work for me.



RE: Door Force Won't Open Door! - Your Computer - 11-02-2011

(11-02-2011, 12:55 AM)Statyk Wrote: Did that AND deleted the doorframe. It's still not working. It's like the door is getting caught on itself... This script has NEVER wanted to work for me.

Then i can only suggest to pull the door out of its frame (perhaps even in the air) and test it out. If it still doesn't work, then try a negative value for the prop force. If it works then, then the issue was improper placement of the door. If it still doesn't work, then i don't know (aside from cache conflicts).


RE: Door Force Won't Open Door! - flamez3 - 11-02-2011

(11-02-2011, 01:16 AM)Your Computer Wrote:
(11-02-2011, 12:55 AM)Statyk Wrote: Did that AND deleted the doorframe. It's still not working. It's like the door is getting caught on itself... This script has NEVER wanted to work for me.

Then i can only suggest to pull the door out of its frame (perhaps even in the air) and test it out. If it still doesn't work, then try a negative value for the prop force. If it works then, then the issue was improper placement of the door. If it still doesn't work, then i don't know (aside from cache conflicts).
Maybe your pushing the door so hard it comes back to the frame? Try lowering to like 10 or something./


RE: Door Force Won't Open Door! - Statyk - 11-02-2011

(11-02-2011, 02:42 AM)flamez3 Wrote: Maybe your pushing the door so hard it comes back to the frame? Try lowering to like 10 or something./
I'll give that a shot, thanks...





RE: Door Force Won't Open Door! - Your Computer - 11-02-2011

I suppose i should mention that you don't need more than 1000 force for an instantly opening door; 500 for a slowly opening door.


RE: Door Force Won't Open Door! - Statyk - 11-02-2011

(11-02-2011, 02:55 AM)Your Computer Wrote: I suppose i should mention that you don't need more than 1000 force for an instantly opening door; 500 for a slowly opening door.
That could be a big issue.... >> would setting it too high make it freak out like it is doing? lol It nearly broke off it's hinges.



RE: Door Force Won't Open Door! - GreyFox - 11-02-2011

What do you have the force set at right now?

-Grey Fox



RE: Door Force Won't Open Door! - palistov - 11-02-2011

Try using AddPropImpulse. It functions the same way but the values necessary to move the prop are way lower.