The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Open Door Script problem
pawsUp1703 Offline
Junior Member

Posts: 45
Threads: 16
Joined: Jan 2011
Reputation: 0
#1
Open Door Script problem

Hey guys Smile
I have a problem I made a timer for making a door open slowly and copied the script from one of the original scripts and it worked however i made a second timer exactly like the first one with anothe rname and it doesn't work..
can anybody help me?

working timer:
        SetSwingDoorClosed("mansion_2", false, false);
    SetSwingDoorDisableAutoClose("mansion_2", true);
    AddTimer("mansion_2", 0.01f, "TimerSwingDoor");

void TimerSwingDoor(string &in asTimer)
{
    if(GetLocalVarInt("SwingDoor") == 10){
        SetLocalVarInt("SwingDoor", 0);
        return;
    }
    
    if(asTimer == "mansion_2") AddPropForce(asTimer, 70.0f, 0, 0, "World");
    else AddPropForce(asTimer, -95.0f, 0, 0, "World");
    
    AddLocalVarInt("SwingDoor", 1);
    
    AddTimer(asTimer, 0.03f, "TimerSwingDoor");
}
Not working timer:
        SetSwingDoorLocked("mansion_4", false, false);
    SetSwingDoorClosed("mansion_4", false, false);
    SetSwingDoorDisableAutoClose("mansion_4", true);
    GiveSanityDamage(30, true);
    AddTimer("mansion_4", 0.01f, "TimerSwingDoor2");

void TimerSwingDoor2(string &in asTimer)
{
    if(GetLocalVarInt("SwingDoor1") == 10){
        SetLocalVarInt("SwingDoor1", 0);
        return;
    }
    
    if(asTimer == "mansion_4") AddPropForce(asTimer, 70.0f, 0, 0, "World");
    else AddPropForce(asTimer, -95.0f, 0, 0, "World");
    
    AddLocalVarInt("SwingDoor1", 1);
    
    AddTimer(asTimer, 0.03f, "TimerSwingDoor2");
}

It doesn't matter if you love him, or capital H.I.M.
Just put your Paws Up, 'cause you were Born This Way baby!
02-06-2011, 11:25 AM
Find


Messages In This Thread
Open Door Script problem - by pawsUp1703 - 02-06-2011, 11:25 AM
RE: Open Door Script problem - by Tottel - 02-06-2011, 12:15 PM
RE: Open Door Script problem - by pawsUp1703 - 02-06-2011, 12:35 PM



Users browsing this thread: 2 Guest(s)