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
i need some help/ explaination
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#16
RE: i need some help/ explaination

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: (Select All)
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: (Select All)
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");



"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 12-26-2014, 04:12 AM by PutraenusAlivius.)
12-25-2014, 06:38 AM
Find


Messages In This Thread
i need some help/ explaination - by Headless - 12-24-2014, 01:28 AM
RE: i need some help/ explaination - by Kurton - 12-24-2014, 02:13 AM
RE: i need some help/ explaination - by Headless - 12-24-2014, 11:08 AM
RE: i need some help/ explaination - by Headless - 12-24-2014, 12:43 PM
RE: i need some help/ explaination - by Headless - 12-24-2014, 01:52 PM
RE: i need some help/ explaination - by Headless - 12-24-2014, 02:14 PM
RE: i need some help/ explaination - by Headless - 12-24-2014, 02:58 PM
RE: i need some help/ explaination - by Headless - 12-24-2014, 04:46 PM
RE: i need some help/ explaination - by Headless - 12-24-2014, 11:43 PM
RE: i need some help/ explaination - by L00T3R123 - 12-25-2014, 04:29 AM
RE: i need some help/ explaination - by PutraenusAlivius - 12-25-2014, 06:38 AM
RE: i need some help/ explaination - by Headless - 12-25-2014, 12:26 PM
RE: i need some help/ explaination - by Headless - 12-25-2014, 01:43 PM
RE: i need some help/ explaination - by Romulator - 12-26-2014, 05:35 AM
RE: i need some help/ explaination - by Headless - 12-26-2014, 01:03 PM
RE: i need some help/ explaination - by Headless - 12-26-2014, 05:48 PM
RE: i need some help/ explaination - by Headless - 12-26-2014, 06:22 PM
RE: i need some help/ explaination - by Traggey - 12-26-2014, 06:56 PM
RE: i need some help/ explaination - by Headless - 12-26-2014, 07:21 PM
RE: i need some help/ explaination - by Headless - 12-26-2014, 10:23 PM
RE: i need some help/ explaination - by Headless - 12-27-2014, 02:20 AM
RE: i need some help/ explaination - by Headless - 12-27-2014, 01:11 PM
RE: i need some help/ explaination - by Daemian - 12-27-2014, 04:34 PM



Users browsing this thread: 1 Guest(s)