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
.lang / script error...
LocalParty Offline
Junior Member

Posts: 34
Threads: 10
Joined: Jan 2012
Reputation: 0
#1
.lang / script error...

Okey soooo i have a .lang file that looks like this





Jag venneh vad det ska handla om än!

Men storyn' kommer vara så jäääävla grym! Big Grin




"Key To A Locked Door…"
Iron Key
"A Key!!!"
Rusty Key


RUUUN!!! Don't look back…
Right, Left, Left, Right...



Everything works but not the last thing... The RUN DON LOCK BACK SHIIIIT!

The script looks like.


void OnStart()
{
AddTimer("pianotimer", 0, "pianotimer");
AddEntityCollideCallback("Player", "pianostop", "pianostop", true, 1);
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddEntityCollideCallback("Player", "Run_1", "MonsterFunction_2", false, 1);
AddEntityCollideCallback("Player", "Face", "MonsterFunction_3", false, 1);
AddEntityCollideCallback("Player", "Face_1", "MonsterFunction_4", false, 1);
AddEntityCollideCallback("Player", "Face_2", "MonsterFunction_5", false, 1);
AddEntityCollideCallback("Player", "Spawn", "Spawn", true, 1);
}

void pianotimer(string &in asTimer)
{
PlaySoundAtEntity("piano", "general_piano03", "piano", 0, false);
AddTimer("pianotimer", 18, "pianotimer");
}

void pianostop(string &in asParent, string &in asChild, int alState)
{
StopSound("piano", 0);
RemoveTimer("pianotimer");
SetLeverStuckState("piano", -1, true);
AddPropImpulse("piano", 0, 0, 100, "World");
PlaySoundAtEntity("piano", "break_wood", "piano", 0, false);
CreateParticleSystemAtEntity("", "ps_dust_impact.ps", "impact", false);

}
void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("castle_1", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);
}


void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("hanging_corpse", true);
StartScreenShake( 0.02, 1, 0.5, 0.5);
GiveSanityDamage(5.0f, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);
}

void MonsterFunction_2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_2", true);
ShowEnemyPlayerPosition("servant_grunt_2");
StartScreenShake( 0.02, 3, 1, 1);
GiveSanityDamage(5.0f, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);
SetMessage("Information", "run", 1);
CheckPoint ("", "PlayerStartArea_2", "CALLBACKFUNC", "DeathHint", "Description1");
}

void MonsterFunction_3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("hanging_prisoner_1", true);
StartScreenShake( 0.02, 1, 0.5, 0.5);
GiveSanityDamage(5.0f, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);
}

void MonsterFunction_4(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("hanging_prisoner_3", true);
SetEntityActive("hanging_prisoner_4", true);
StartScreenShake( 0.02, 1, 0.5, 0.5);
GiveSanityDamage(5.0f, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);
}

void MonsterFunction_5(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("hanging_prisoner_2", true);
StartScreenShake( 0.02, 1, 0.5, 0.5);
GiveSanityDamage(5.0f, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);
}
void Spawn(string &in asParent, string &in asChild, int alState)
{
CheckPoint ("", "PlayerStartArea_2", "", "DeathHint", "Description1");
}

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "CastleKey_1", "castle_2", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("CastleKey_1", "OnPickup");
SetEntityPlayerInteractCallback("Level_2", "TeleportFunction", true);
AddUseItemCallback("", "CastleKey_2", "castle_1", "UsedKeyOnDoor_1", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_2", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "castle_2", 0, false);
RemoveItem("CastleKey_1");
}

void UsedKeyOnDoor_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "castle_1", 0, false);
RemoveItem("CastleKey_2");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("monster_grunt", true);
ShowEnemyPlayerPosition("monster_grunt");
StartScreenShake( 0.02, 1, 0.5, 0.5);

SetPropHealth("castle_1", 0.0f);


PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);


PlaySoundAtEntity("", "react_scare", "Player", 0, false);


PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);


GiveSanityDamage(5.0f, true);
}

void TeleportFunction(string &in asEntity)
{
ChangeMap("Empty_Spaces2", "PlayerStartArea_1", "", "");
}

HELP ME!!!!!
(This post was last modified: 01-17-2012, 08:45 PM by LocalParty.)
01-17-2012, 12:45 PM
Find
LocalParty Offline
Junior Member

Posts: 34
Threads: 10
Joined: Jan 2012
Reputation: 0
#2
RE: .lang / script error...

Someone?
01-17-2012, 05:56 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#3
RE: .lang / script error...

Try deleting the !!! out of it.

01-17-2012, 06:02 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#4
RE: .lang / script error...

Do you mean the deathhint Run don't look back?

01-17-2012, 06:02 PM
Find
LocalParty Offline
Junior Member

Posts: 34
Threads: 10
Joined: Jan 2012
Reputation: 0
#5
RE: .lang / script error...

(01-17-2012, 06:02 PM)SilentStriker Wrote: Do you mean the deathhint Run don't look back?
Yeah... Smile
01-17-2012, 06:10 PM
Find
EmmetVG Offline
Junior Member

Posts: 47
Threads: 7
Joined: Nov 2011
Reputation: 2
#6
RE: .lang / script error...

Can you give me the whole CS? then i should find the problem.

01-17-2012, 08:22 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#7
RE: .lang / script error...

Why does it say CALLBACKFUNC on one checkpoint and nothing in the other?

01-17-2012, 08:27 PM
Find
LocalParty Offline
Junior Member

Posts: 34
Threads: 10
Joined: Jan 2012
Reputation: 0
#8
RE: .lang / script error...

(01-17-2012, 08:27 PM)SilentStriker Wrote: Why does it say CALLBACKFUNC on one checkpoint and nothing in the other?
Yeah i did not use it... Should i remove? Smile)
01-17-2012, 08:32 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#9
RE: .lang / script error...

I have never done a checkpoint script before but I'm looking at others checkpoint scripts...

Try with removing the Callbackfunc part.

If that not works then write Checkpoint01 and just write
void Checkpoint01(string &in asName, int alCount)
{
}

(This post was last modified: 01-17-2012, 08:42 PM by SilentStriker.)
01-17-2012, 08:42 PM
Find
LocalParty Offline
Junior Member

Posts: 34
Threads: 10
Joined: Jan 2012
Reputation: 0
#10
RE: .lang / script error...

(01-17-2012, 08:42 PM)SilentStriker Wrote: I have never done a checkpoint script before but I'm looking at others checkpoint scripts...

Try with removing the Callbackfunc part.

If that not works then write Checkpoint01 and just write
void Checkpoint01(string &in asName, int alCount)
{
}
Its Solved! Tnx! Big Grin
01-17-2012, 08:44 PM
Find




Users browsing this thread: 1 Guest(s)