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
Script Help Custom story error that I can't solve!?
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#8
RE: Custom story error that I can't solve!?

PHP Code: (Select All)
void OnStart()
{
AddEntityCollideCallback("Handle""AreaConnect""AttachLever"true1);
wakeUp();
}

void wakeUp()
{
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(10); // Amount of seconds the fade in takes
FadeImageTrailTo(22);
FadeSepiaColorTo(02);
SetPlayerActive(false); 
FadePlayerRollTo(50220220); // "Tilts" the players head
FadeRadialBlurTo(0.52);
SetPlayerCrouching(true); // Simulates being on the ground
PlayMusic("18_amb.ogg"true141true);
AddEntityCollideCallback("Player""AreaCollide""EventCollide"true1);
AddTimer("trig1"11.0f"beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}

void beginStory(string &in asTimer)
{
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(03333); // Change all settings to defaults
FadeRadialBlurTo(0.01);
FadeSepiaColorTo(04);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
SetPlayerLampOil(45);
GiveSanityDamage(80false);
GivePlayerDamage(30 "false" falsefalse);
SetPlayerMoveSpeedMul(0.58f);
SetPlayerRunSpeedMul(0);
//SetPlayerLookSpeedMul(0.5);
AddUseItemCallback("""HollowNeedle""CellDoor""UseHollowNeedleOnDoor"true);
}

void UseHollowNeedleOnDoor(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("CellDoor"falsetrue);
PlaySoundAtEntity("""unlock_door.ogg"asEntity0false);
GiveSanityBoostSmall();
RemoveItem(asItem);
}

void EventCollide(string &in asParentstring &in asChildint alState)
{
SetEntityActive("CellGuardGrunt"true);
AddEnemyPatrolNode("CellGuardGrunt""Node_1",0.001f"");
AddEnemyPatrolNode("CellGuardGrunt""Node_4",0.001f"");
AddEnemyPatrolNode("CellGuardGrunt""Node_6",0.001f"");
AddEnemyPatrolNode("CellGuardGrunt""Node_10",0.001f"");
AddEnemyPatrolNode("CellGuardGrunt""Node_15",0.001f"");
AddEnemyPatrolNode("CellGuardGrunt""Node_18",0.001f""); 



void AttachLever(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("Lever"true);

    
SetEntityActive(asParentfalse);
    
SetEntityActive("Mount"false);

}

void UnlockDoor(string &in asEntityint LeverState)
{
    if(
LeverState == 1
    {
        
SetSwingDoorLocked("Open"falsetrue);
        
GiveSanityBoostSmall();
        
PlaySoundAtEntity("""unlock_door.ogg""Open"0false);
        
SetLeverStckState(asEntityLeverStatebool abEffects);
    }


"Veni, vidi, vici."
"I came, I saw, I conquered."
01-31-2014, 03:38 PM
Find


Messages In This Thread
RE: Custom story error that I can't solve!? - by PutraenusAlivius - 01-31-2014, 03:38 PM



Users browsing this thread: 1 Guest(s)