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!?
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#5
RE: Custom story error that I can't solve!?

It gets me this error instead

FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon/maps/Lifeless_The Abandon.hps'!
main (7, 1) : ERR : Unexpected token '{'

here's the updated script

void OnStart()

{
AddEntityCollideCallback("Handle", "AreaConnect", "AttachLever", true, 1);
}

{
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(2, 2);
FadeSepiaColorTo(0, 2);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.5, 2);
SetPlayerCrouching(true); // Simulates being on the ground
PlayMusic("18_amb.ogg", true, 1, 4, 1, true);
AddEntityCollideCallback("Player", "AreaCollide", "EventCollide", true, 1);
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(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
SetPlayerLampOil(45);
GiveSanityDamage(80, false);
GivePlayerDamage(30 , "false" , false, false);
SetPlayerMoveSpeedMul(0.58f);
SetPlayerRunSpeedMul(0);
//SetPlayerLookSpeedMul(0.5);
AddUseItemCallback("", "HollowNeedle", "CellDoor", "UseHollowNeedleOnDoor", true);
}

void UseHollowNeedleOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("CellDoor", false, true);
PlaySoundAtEntity("", "unlock_door.ogg", asEntity, 0, false);
GiveSanityBoostSmall();
RemoveItem(asItem);
}

void EventCollide(string &in asParent, string &in asChild, int 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 asParent, string &in asChild, int alState)
{
    SetEntityActive("Lever", true);

    SetEntityActive(asParent, false);
    SetEntityActive("Mount", false);

}

void UnlockDoor(string &in asEntity, int LeverState)
{
    if(LeverState == 1) {
        SetSwingDoorLocked("Open", false, true);
        GiveSanityBoostSmall();
        PlaySoundAtEntity("", "unlock_door.ogg", "Open", 0, false);
        SetLeverStckState(asEntity, LeverState, bool abEffects);
    }
}
(This post was last modified: 01-31-2014, 03:05 PM by Radical Batz.)
01-31-2014, 03:02 PM
Find


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



Users browsing this thread: 1 Guest(s)