Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 5 Vote(s) - 4.2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Abandoned Town (Community Project)
CarnivorousJelly Offline
Posting Freak

Posts: 1,196
Threads: 41
Joined: Dec 2012
Reputation: 80
#53
RE: Any Interest in Many Hands Project?

This is the script file that goes with Hardarm's version of the map:

Spoiler below!

PHP Code: (Select All)
///////////////////
//KIANDRA'S ROOMS//
///////////////////
void func_unlock(string &in asEntityint alState)
{
if (
alState == 1)
{
    
SetSwingDoorLocked("castle_arched01_1"truetrue);
    
SetSwingDoorClosed("castle_arched01_1"truetrue);
}

if (
alState == -1)
{
    
SetSwingDoorLocked("castle_arched01_1"falsetrue);
    
SetSwingDoorDisableAutoClose("castle_arched01_1"true);
    
AddPropForce("castle_arched01_1"0.0f0.0f, -1000.0f"World");
}
}

//////////////////////
//Romulator's Map(s)//
//////////////////////
void turnphono(string &in asEntityint alState)
{
    
SetWheelInteractionDisablesStuck(asEntityfalse);
    
SetWheelStuckState(asEntityalStatefalse);
    
//PlayPhono(1, 1, 4, asEntity);
    
PlayMusic("09_amb_safe.ogg"false35.0f7.0f7false);
    
SetEntityActive("ScrStopMusic"true);
}
    
void stop_the_music(string &in asParentstring &in asChildint alState)
{
    
StopMusic(10.0f7);
}
    
    
///////////////////
//Nikson's Rooms//
///////////////////
void func_secret_door(string &in asEntityint alState)
{
    if (
alState == 0)
   {
        
SetMoveObjectState("castlebase_secret_door_1"1);
        
SetLeverStuckState(asEntity1true);
   }
}
    
void func_mus(string &in asParentstring &in asChildint alState)
{
    
PlayMusic("09_amb_safe.ogg"false10.0f5.0f0false);
}

///////////////////
//Flawless' Rooms//
///////////////////

void FlawlessStopMusic(string &in asParentstring &in asChildint alState)
{
    
StopMusic(30);
}
    
void FlawlessNonSuspiciousScare(string &in asParentstring &in asChildint alState)
{
    
AddTimer("SlowPlayer_1"1.0f"NonSuspiciousTimer");
    
AddTimer("SlowPlayer_2"1.5f"NonSuspiciousTimer");
    
AddTimer("SlowPlayer_3"2.0f"NonSuspiciousTimer");
    
    
AddTimer("HeartBeat_1"1.0f"NonSuspiciousTimer");
    
AddTimer("HeartBeat_1"2.0f"NonSuspiciousTimer");
    
AddTimer("HeartBeat_1"3.0f"NonSuspiciousTimer");
    
AddTimer("HeartBeat_1"4.0f"NonSuspiciousTimer");
    
AddTimer("HeartBeat_1"5.0f"NonSuspiciousTimer");
    
AddTimer("HeartBeat_1"6.0f"NonSuspiciousTimer");
    
    
AddTimer("Fade"8.0f"NonSuspiciousTimer");
    
AddTimer("ClearAndFadeOut"9.0f"NonSuspiciousTimer");
    
AddTimer("SetPlayerActive"10.0f"NonSuspiciousTimer");
    
    
AddTimer("ZoomScare"7.0f"NonSuspiciousTimer");
    
    
AddTimer("StopThescaaaawycreaks"5.0f"NonSuspiciousTimer");
    
    
FadePlayerFOVMulTo(2.0f0.5f);
    
    
SetPlayerLookSpeedMul(0.3f);
    
StartPlayerLookAt("LookAtThisGuy"23"");
    
    
PlaySoundAtEntity("Heartbeat""sanity_heartbeat.snt""Player"0.0ffalse);
    
    
PlayMusic("20_event_darkness.ogg"false540false);
    
}

void NonSuspiciousTimer(string &in asTimer)
{
    if(
asTimer == "SlowPlayer_1")
    {
        
SetPlayerMoveSpeedMul(0.75f);
        
CreateParticleSystemAtEntity("Dust_1""ps_dust_falling_rumble.ps""AreaDust_1"false);
    }
    
    if(
asTimer == "SlowPlayer_2")
    {
        
SetPlayerMoveSpeedMul(0.5f);
        
CreateParticleSystemAtEntity("Dust_2""ps_dust_falling_rumble.ps""AreaDust_2"false);
    }
    
    if(
asTimer == "SlowPlayer_3")
    {
        
SetPlayerMoveSpeedMul(0.25f);
        
StartScreenShake(0.075f022);
        
PlaySoundAtEntity("Scaaaawycreaks""00_creak.snt""Player"2.0ffalse);
    }
    
    if(
asTimer == "StopThescaaaawycreaks")
    {
        
StopSound("Scaaaawycreaks"2.0f);
    }

    if(
asTimer == "ZoomScare")
    {
        
SetPlayerActive(false);
        
FadePlayerFOVMulTo(0.0001f4.0f);
        
SetPropActiveAndFade("ThisGuy"true1);
        
PlaySoundAtEntity("WallStomp""scare_wall_stomp.snt""Player"0.0ffalse);
        
FadeImageTrailTo(3.0f10.0f);
    }
    
    if(
asTimer == "HeartBeat_1")
    {
        
PlaySoundAtEntity("Heartbeat""sanity_heartbeat.snt""Player"0.0ffalse);
    }
    
    if(
asTimer == "Fade")
    {
        
AddDebugMessage("FADE"false);
        
FadeImageTrailTo(10.0f10.0f);
    }
    
    if(
asTimer == "ClearAndFadeOut")
    {
        
StopPlayerLookAt();
        
SetEntityActive("ThisGuy"false);
        
AddDebugMessage("CLEAR"false);
        
FadePlayerFOVMulTo(1.0f10.0f);
        
SetPlayerMoveSpeedMul(1.0f);
        
FadeImageTrailTo(0.0f1.0f);
        
SetPlayerLookSpeedMul(1.0f);
    }
    
    if(
asTimer == "SetPlayerActive")
    {
        
AddDebugMessage("ACTIVE"false);
        
SetPlayerActive(true);
    }
}

void PlayerInteractSecretPassage(string &in asEntity)
{
    
AddLocalVarInt("PassageHitCount"1);
    
AddTimer("TimerDecreaseHitCount"0.5f"TimerDecreaseHitCount");    
    
    if(
GetTimerTimeLeft("PassageBreakMessagePaused")==0)
    {
        
PlayGuiSound("impact_rock_low3.ogg"1.0f);
        
PlayGuiSound("15_rock_break"0.7f);
    }
    
    
int lInteractedCount GetLocalVarInt("PassageHitCount");
    
    
int lDebrisArea RandInt(14);
    
CreateParticleSystemAtEntity("PSPassageDebris"+lDebrisArea"ps_dust_impact.ps""PassageInteractDebris_"+lDebrisAreafalse);
    
    
AddDebugMessage("Adding debris PS to PassageInteractDebris_"+lDebrisAreafalse);
    
    if(
lInteractedCount==3)
    {
        
SetPropHealth("mansionbase_secret_passage_1"0);
    }
}

void TimerDecreaseHitCount(string &in asTimer)
{
    
AddLocalVarInt("PassageHitCount", -1);
}
    
    
void OnStart()
{
    
///////////////////
    //KIANDRA'S ROOMS//
    ///////////////////
    
SetEntityConnectionStateChangeCallback("lever_small01_1""func_unlock");
    
SetEntityConnectionStateChangeCallback("lever_simple01_1""func_unlock");
    
SetEntityConnectionStateChangeCallback("lever_small01_2""func_unlock");
    
    
//////////////////////
    //Romulator's Map(s)//
    //////////////////////
    
AddEntityCollideCallback("Player""ScrStopMusic""stop_the_music"false1);
    
    
///////////////////
    //Nikson's Rooms//
    ///////////////////
    
AddEntityCollideCallback("Player""ScrMus""func_mus"false1);
    
SetEntityConnectionStateChangeCallback("lever_simple01_2","func_secret_door");

    
///////////////////
    //Flawless' Rooms//
    ///////////////////
    
AddEntityCollideCallback("Player""AreaStopMusic_1""FlawlessStopMusic"true1);
    
AddEntityCollideCallback("Player""AreaNotScareAtAll_1""FlawlessNonSuspiciousScare"true1);
    for(
int i=1;i<=7;i++) AddEntityCollideCallback("rock_small_"+i"mansionbase_secret_passage_1""CollideHint"true1);
}
void Intro()
{

}
void OnEnter()
{
    
}
void OnLeave()
{
    
//////////////////////
    //Romulator's Map(s)//
    //////////////////////
    
    //Just in case someone leaves while the music is playing
    
    //Because there will be a time where someone flips their table, screams "ALRIGHT, I'M OUT!!!", and then leaves... -Flawless
    
StopMusic(5.0f7);    



Just copy-paste that into notepad++ or geany and save as ManyHands2_07, should work then in case whoever goes next wants to modify the script c:

(So you don't have to download a previous version of the map just to download the script)

[Image: quote_by_rueppells_fox-d9ciupp.png]
(This post was last modified: 04-18-2014, 10:58 PM by CarnivorousJelly.)
04-18-2014, 10:57 PM
Find


Messages In This Thread
RE: Any Interest in Many Hands Project? - by Kman - 04-15-2014, 03:12 AM
RE: Any Interest in Many Hands Project? - by Vale - 04-15-2014, 01:11 PM
RE: Any Interest in Many Hands Project? - by Vale - 04-15-2014, 02:12 PM
RE: Any Interest in Many Hands Project? - by Vale - 04-15-2014, 03:39 PM
RE: Any Interest in Many Hands Project? - by Kman - 04-16-2014, 06:56 AM
RE: Any Interest in Many Hands Project? - by Vale - 04-16-2014, 10:03 PM
RE: Any Interest in Many Hands Project? - by WALP - 04-18-2014, 12:12 PM
RE: Any Interest in Many Hands Project? - by CarnivorousJelly - 04-18-2014, 10:57 PM
RE: Any Interest in Many Hands Project? - by Red - 04-21-2014, 03:01 PM
RE: Any Interest in Many Hands Project? - by Red - 04-21-2014, 03:22 PM
RE: Any Interest in Many Hands Project? - by Red - 04-21-2014, 03:33 PM
RE: Any Interest in Many Hands Project? - by Red - 04-21-2014, 04:30 PM
RE: Any Interest in Many Hands Project? - by Red - 04-21-2014, 04:23 PM
RE: Any Interest in Many Hands Project? - by Red - 04-21-2014, 04:45 PM
RE: Any Interest in Many Hands Project? - by Red - 04-21-2014, 07:37 PM
RE: Any Interest in Many Hands Project? - by Red - 04-21-2014, 07:48 PM
RE: Any Interest in Many Hands Project? - by Red - 04-22-2014, 02:21 PM
RE: Any Interest in Many Hands Project? - by Red - 04-22-2014, 02:42 PM
RE: Any Interest in Many Hands Project? - by Red - 04-22-2014, 02:44 PM
RE: Any Interest in Many Hands Project? - by Red - 04-22-2014, 03:00 PM
RE: Any Interest in Many Hands Project? - by Red - 04-22-2014, 03:04 PM
RE: Any Interest in Many Hands Project? - by Red - 04-22-2014, 03:15 PM
RE: Any Interest in Many Hands Project? - by Vale - 05-01-2014, 03:14 AM
RE: Any Interest in Many Hands Project? - by Vale - 06-17-2014, 07:51 PM
RE: Any Interest in Many Hands Project? - by Vale - 06-20-2014, 02:27 AM
RE: Abandoned Town (Community Project) - by Artsy - 07-24-2014, 11:30 PM
RE: Abandoned Town (Community Project) - by Artsy - 07-25-2014, 01:10 AM
RE: Abandoned Town (Community Project) - by Artsy - 07-25-2014, 12:41 PM
RE: Abandoned Town (Community Project) - by Red - 07-25-2014, 03:44 PM
RE: Abandoned Town (Community Project) - by Red - 07-27-2014, 04:01 PM
RE: Abandoned Town (Community Project) - by Red - 07-27-2014, 09:07 PM
RE: Abandoned Town (Community Project) - by Nice - 07-27-2014, 09:08 PM
RE: Abandoned Town (Community Project) - by Red - 07-28-2014, 12:56 PM
RE: Abandoned Town (Community Project) - by Red - 07-28-2014, 08:26 PM
RE: Abandoned Town (Community Project) - by Red - 07-28-2014, 11:53 PM
RE: Abandoned Town (Community Project) - by Red - 07-29-2014, 02:16 PM
RE: Abandoned Town (Community Project) - by Red - 07-29-2014, 07:09 PM
RE: Abandoned Town (Community Project) - by Red - 08-01-2014, 01:28 PM
RE: Abandoned Town (Community Project) - by Red - 08-01-2014, 01:42 PM
RE: Abandoned Town (Community Project) - by Red - 08-01-2014, 01:57 PM
RE: Abandoned Town (Community Project) - by Red - 08-01-2014, 02:32 PM
RE: Abandoned Town (Community Project) - by Red - 08-01-2014, 09:01 PM
RE: Abandoned Town (Community Project) - by Red - 08-05-2014, 12:52 AM
RE: Abandoned Town (Community Project) - by Red - 08-05-2014, 02:15 PM
RE: Abandoned Town (Community Project) - by Red - 08-05-2014, 07:58 AM
RE: Abandoned Town (Community Project) - by Artsy - 09-06-2014, 03:44 PM



Users browsing this thread: 2 Guest(s)