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
#28
RE: i need some help/ explaination

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: (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"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: (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"falsetrue);
    
AddTimer("Ad"0.35f"AddForce");


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



"Veni, vidi, vici."
"I came, I saw, I conquered."
12-27-2014, 01:18 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 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 PutraenusAlivius - 12-27-2014, 01:18 AM
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)