Frictional Games Forum (read-only)

Full Version: SetSwingDoorDisableAutoClose does not work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi
i need to open a door dynamicaly using propforce
the thing is, SetSwingDoorDisableAutoClose does not work.

Code:
[...]
    SetSwingDoorDisableAutoClose("door", true);
    SetSwingDoorLocked("door", false, true);    
    AddTimer("",2,"asd");
   [...]

void asd(string &in asTimer){
    AddPropForce("door", 10000, 0, 0, "world");
}

i see the door going berserk because the high force, but it does not stay open.
when i try open the door a bit manualy the door auto-closes, too.

i am using the standard mansion door
FULL SCRIPT, PLEASE!
no need for full script.

this is the relevant part. the rest is working properly and has no other function effecting the door
Try changing the true in the SetSwingDoorDisableAutoClose to false.
well, i have tried it before but since false means disableautoclose = false , it didn't work Smile
Instead of doing that, then set the door's "Open Amount" to 0.1 or 0.2
Disabling auto-close does not place the door in an opened state. You need SetSwingDoorClosed for that.
ok, i think i forgot to mention that the door is initially locked.

i tried the open amount, but it seems to me that the open amount is applied after map load, not after the door is unlocked. so it did not work.

then i tried it with using doorClosed = false
Code:
void abc(string &in asParent,string &in asChild, int alState){    
    SetSwingDoorDisableAutoClose("door", false);    //1
    SetSwingDoorLocked("door", false, false);//2
    SetSwingDoorClosed("door", false, false);//3    
    AddTimer("",2,"asd");
}

void asd(string &in asTimer){
    AddPropForce("door", 1000, 0, 0, "world");
    AddDebugMessage("force",false);
}

but this did not work either, no matter the order of the 3 calls.
is still something wrong?

if not, and it's not working for an unknown reason, i think i will just set an other door active, not locked, open amount 0.15 , and apply force on that door >_>