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-24-2014

Okay I tested it. door B is locked and it unlocks itself when i interact with door A. However it doesnt swing or make sound yet?

How high should prob force be ?


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

(12-24-2014, 02:58 PM)Headless Wrote: How high should prob force be ?

A bit high. It must be between ~100 (weak) to ~10000 (strong)


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

It doesnt work it refuses to SWING open but i can open it manually


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

It just unlcocks without anything else no sound or slam


RE: i need some help/ explaination - L00T3R123 - 12-25-2014

shouldnt the door be closed if the door is lock. how would the door slam shut if the door is locked and not opened


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

The door is unlocked. I should probably add a little timer then. One minute.

EDIT:
No wonder. Your force is -1. It isn't enough. Won't even make anything.

Use this one below if the door is on the X axis.
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"falsefalse);
    
AddPropForce("Door_B"500000"World");



Use this one below if the door is on the Z-axis.
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"falsefalse);
    
AddPropForce("Door_B"005000"World");





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

No still not working :/


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

Bleu arrow is Z axis. so did the Z axis script you wrote me but it behaves still the same


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

(12-25-2014, 01:43 PM)Headless Wrote: Bleu arrow is Z axis. so did the Z axis script you wrote me but it behaves still the same

It just unlocks? Weird. Did you name it accordingly? Like change Door_A to the door in your map and stuff?

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");





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

Maybe you need SetSwingDoorClosed(); ?

Also, are you using Swing Doors or Level Doors? Level Doors will not swing open.