Frictional Games Forum (read-only)
i need some help/ explaination - 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: i need some help/ explaination (/thread-28348.html)

Pages: 1 2 3 4


RE: i need some help/ explaination - Headless - 12-26-2014

Yes I did change the prop names on my map.
Otherwise it would not unlock in the first place would it?
-------------------------------------------------------------------
I use for both doors swing doors


RE: i need some help/ explaination - Headless - 12-26-2014

Ok so i have decided to work on a new map till i ca nfigure out how to do it


RE: i need some help/ explaination - PutraenusAlivius - 12-26-2014

(12-26-2014, 05:48 PM)Headless Wrote: Ok so i have decided to work on a new map till i ca nfigure out how to do it

Try using my newest script posted before Romulator's post. So the doors won't swing open? They just unlock?


RE: i need some help/ explaination - Headless - 12-26-2014

(12-26-2014, 05:56 PM)Julius Caesar Wrote:
(12-26-2014, 05:48 PM)Headless Wrote: Ok so i have decided to work on a new map till i ca nfigure out how to do it

Try using my newest script posted before Romulator's post. So the doors won't swing open? They just unlock?

I did doesnt work :/
Yes that's what Door_B does.


RE: i need some help/ explaination - Traggey - 12-26-2014

Try to post in the correct forum next time! Wink

Moved to development support.


RE: i need some help/ explaination - Headless - 12-26-2014

Ok I will.


RE: i need some help/ explaination - Headless - 12-26-2014

You know I want to slam it open right?

I thought. maybe the code is made to slose it


RE: i need some help/ explaination - PutraenusAlivius - 12-27-2014

Door_B is on the Z-axis yes? Try one of these scripts. If one of them doesn't work use the other.

FIRST SCRIPT
Spoiler below!

PHP Code:
void OnStart()
{
    
AddUseItemCallback("Player""DoorLocked""DoorOpenSlamming""DOORopen"true);
    
AddUseItemCallback("""DoorLocked""SlammingSound""DOORopenSOUND"true);
    
AddUseItemCallback("""Key""Door""UseKeyOnDoor"true);
    
SetLocalVarInt("DoorVar"0);
    
SetSwingDoorLocked("Door_A"truetrue);
    
SetSwingDoorLocked("Door_B"truetrue);
    
SetEntityPlayerInteractCallback("Door_A""Slam_Door_B"false);
}

void UseKeyOnDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked(asEntityfalsetrue);
    
RemoveItem(asItem);
}

void Slam_Door_B(string &in asEntity)
{
    
AddLocalVarInt("DoorVar"1);
    
DoorCheck();
}

void DoorCheck()
{
    if(
GetLocalVarInt("DoorVar") == 10//Indicates you have to interact with it ten(10) times
    
{
        
AddTimer("Slam"2.75f"Slam");
    }
}

void Slam(string &in asTimer)
{
    
SetSwingDoorLocked("Door_B"falsetrue);
    
AddTimer("Ad"0.35f"AddForce");


void AddForce(string &in asTimer)
{
    
AddPropForce("Door_B"005000"World");
    
AddPropImpulse("Door_B"006"World");



SECOND SCRIPT
Spoiler below!

PHP Code:
void OnStart()
{
    
AddUseItemCallback("Player""DoorLocked""DoorOpenSlamming""DOORopen"true);
    
AddUseItemCallback("""DoorLocked""SlammingSound""DOORopenSOUND"true);
    
AddUseItemCallback("""Key""Door""UseKeyOnDoor"true);
    
SetLocalVarInt("DoorVar"0);
    
SetSwingDoorLocked("Door_A"truetrue);
    
SetSwingDoorLocked("Door_B"truetrue);
    
SetEntityPlayerInteractCallback("Door_A""Slam_Door_B"false);
}

void UseKeyOnDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked(asEntityfalsetrue);
    
RemoveItem(asItem);
}

void Slam_Door_B(string &in asEntity)
{
    
AddLocalVarInt("DoorVar"1);
    
DoorCheck();
}

void DoorCheck()
{
    if(
GetLocalVarInt("DoorVar") == 10//Indicates you have to interact with it ten(10) times
    
{
        
AddTimer("Slam"2.75f"Slam");
    }
}

void Slam(string &in asTimer)
{
    
SetSwingDoorLocked("Door_B"falsetrue);
    
AddTimer("Ad"0.35f"AddForce");


void AddForce(string &in asTimer)
{
    
AddPropForce("Door_B"00, -5000"World");
    
AddPropImpulse("Door_B"00, -6"World");





RE: i need some help/ explaination - Headless - 12-27-2014

Still nothing...

Ok so just made a new map to test if it was something with the map.
made it so i can see both doors.
what turns out. door B opens for a split second and after that closes it self


RE: i need some help/ explaination - PutraenusAlivius - 12-27-2014

Then add:
PHP Code:
SetSwingDoorDisableAutoClose(stringasNamebool abDisableAutoClose); 

It seems like the door's tendency to close is greater so disable it.