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
Help with variable ints!
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#9
RE: Help with variable ints!

Ok I made the original I did not rename them this time, so is this supposed to work in game now? should I name the containers BarrelCheck or the script boxes that I am going to put the container on?

PHP Code: (Select All)
void OnStart()
{
    
    
PlayMusic("04_amb.ogg"true141true);
    
AddTimer("AreaScrape_"RandFloat(3.0f,10.f), "TimerAreaScrape");
    
AddTimer("AreaStep_"RandFloat(3.0f,10.f), "TimerAreaStep");
    
AddUseItemCallback("""DirtyContainer""PutCont""UseContainer"true);
    
AddEntityCollideCallback("Player""AreaDoor""EventDoor"true1);
    
SetLocalVarInt("BarrelCheck"0);     
    
    


}

void TimerAreaScrape(string &in asTimer)
{
    
int iRand RandInt(16);

    
PlaySoundAtEntity(asTimer+iRand"15_wall_crawl.snt"asTimer+iRand1false);
    
AddTimer("EndRadial"4.0f"TimerEndRadial");
    
AddTimer(asTimerRandFloat(15.0f30.0f), "TimerAreaScrape");
}

void TimerAreaStep(string &in asTimer)
{
    
int iRand RandInt(16);

    
PlaySoundAtEntity(asTimer+iRand"scare_wood_creak_walk.snt"asTimer+iRand1false);
    
AddTimer("EndRadial"4.0f"TimerEndRadial");
    
AddTimer(asTimerRandFloat(15.0f30.0f), "TimerAreaStep");
}

void EventDoor(string &in asParentstring &in asChildint alState)
{
        
SetSwingDoorClosed("Door"falsefalse);
        
SetSwingDoorDisableAutoClose("Door"true);
 
        
PlaySoundAtEntity("creak""joint_door_move_special.snt""Door"1false);
    
PlaySoundAtEntity("Wind""general_wind_whirl""Player"2false);
    
PlaySoundAtEntity("scare""react_scare.snt""Player"0.75ffalse);
    
PlaySoundAtEntity("SoundBong""scare_tingeling.snt""Player"0.0ffalse);
    
PlayMusic("18_amb.ogg"true1.0f00true);
    
CreateParticleSystemAtEntity("PSDoor_3""ps_dust_push.ps""Door"false);
    
CreateParticleSystemAtEntity("PSDoor_4""ps_dust_push.ps""Door"false);
    
GiveSanityDamage(10true);    
 
        
AddTimer(""2"TimerStopSound");
        
AddTimer("Door"0"TimerMoveDoor");
}
 
void TimerMoveDoor(string &in asTimer)
{
        if(
GetLocalVarInt("VarDoor") == 50) return;
        
AddLocalVarInt("VarDoor"1);
 
        
AddTimer(asTimer0.03"TimerMoveDoor");
 
        
AddPropForce(asTimer7000"world");
}
 
void TimerStopSound(string &in asTimer)
{
        
StopSound("creak"0.4);
}

void TurnLiquidValve(string &in asEntityNameint alState)
{
 if(
alState == 1)
 {
  
CreateParticleSystemAtEntity("liquidps""ps_liquid_epoxy.ps""PS"false);
  
CreateParticleSystemAtEntity("splat""ps_liquid_epoxy_splatt.ps""PS_1"true);
 
  
PlaySoundAtEntity("turnon""12_valve_stuck"asEntityName0false);
  
  
PlaySoundAtEntity("hdfg""12_epoxy_flow"asEntityName0true);
   
  
AddTimer("fillcontainer"5.0f"TimerFillContainer");
 }
}

void TimerFillContainer(string &in asTimer)
{
 
SetPropActiveAndFade("Empty"false0.5f);
 
SetPropActiveAndFade("Clean"true0.5f);
SetEntityActive("PutCont"false);
AddPlayerSanity(2);
}

void InteractCallback(string &in asEntity)
{
 if(
GetLocalVarInt("ContainerUsed") == 0SetMessage("Messages""Place"0);
            return; 
//Stops the script completely
 
 
SetWheelStuckState("ValveStuck"0false);
}

void UseContainer(string &in asEntitystring &in asItem)
{
 
PlaySoundAtEntity("plss""puzzle_place_jar"asEntity0.0ffalse);
SetWheelStuckState("ValveStuck"0true);
 
 
SetEntityActive("Empty"true);
 
SetLocalVarInt("ContainerUsed"1);
}


void ContainerOnBarrelCheck()
{
    if(
GetLocalVarInt("BarrelCheck") == 1)
    {
        
//WHAT TO DO IF BARREL IS ALREADY CLEANED
    
}

    else if(
GetLocalVarInt("BarrelCheck") != 1)
    {
        
//WHAT TO DO IF BARREL HAVEN'T CLEANED YET
    
}
}
//<- this one 

03-19-2014, 01:40 PM
Find


Messages In This Thread
Help with variable ints! - by Radical Batz - 03-19-2014, 10:05 AM
RE: Help with variable ints! - by Radical Batz - 03-19-2014, 10:24 AM
RE: Help with variable ints! - by Radical Batz - 03-19-2014, 10:38 AM
RE: Help with variable ints! - by Mudbill - 03-19-2014, 12:16 PM
RE: Help with variable ints! - by Mudbill - 03-19-2014, 01:23 PM
RE: Help with variable ints! - by Radical Batz - 03-19-2014, 01:40 PM
RE: Help with variable ints! - by Mudbill - 03-19-2014, 01:57 PM
RE: Help with variable ints! - by Mudbill - 03-19-2014, 02:26 PM



Users browsing this thread: 1 Guest(s)