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
Amnesia Custom Story ERROR!
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#1
Amnesia Custom Story ERROR!

hey im venomz and i am new here i was working on a piano script with effects i got some error's

errors > http://i50.tinypic.com/30vmxd5.png


this is my script.


////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "SewersKey", "SewersDoor", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player" , "ScriptArea_1" , "Murder" , true , 1);
AddEntityCollideCallback("Player", "Walk_Quest_Area", "GetWalkQuest", true, 1);
AddEntityCollideCallback("Player", "Walk_Complete_Area", "FinishWalkQuest", true, 1);
Addtimer("pianotimer", 0, "pianotimer");
AddEntityCollideCallback("Player", "pianostop", "pianostop", true, 1);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("SewersDoor", false, true);
PlaySoundAtEntity("", "unlock_door", "SewersDoor", 0, false);
RemoveItem("SewersKey");
}

void Murder(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("murder" , true);
}

void GetWalkQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("walkquest", "WalkQuest");
}

void FinishWalkQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("walkquest", "WalkQuest");
}

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", 0, trueSmile;
AddPropImpulse("piano", 0, 0, 100, "World");
PlaySoundAtEntity("piano", "break_wood", "piano", 0, false);
CreateParticleSystemAtEntity("", "ps_dust_impact.ps", "impact", false);
}


////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
(This post was last modified: 12-14-2012, 08:51 PM by VeNoMzTeamHysterical.)
12-14-2012, 08:48 PM
Website Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Amnesia Custom Story ERROR!

This should go here.

Anyways:

The timer thing: I think it's because you put 0 instead 0.1, or something like that. The other issue is that you have a ": )" instead a ")".

So, the script would be:


////////////////////////////

// Run first time starting map

void OnStart()

{

    AddUseItemCallback("", "SewersKey", "SewersDoor", "UsedKeyOnDoor", true);

    AddEntityCollideCallback("Player" , "ScriptArea_1" , "Murder" , true , 1);

    AddEntityCollideCallback("Player", "Walk_Quest_Area", "GetWalkQuest", true, 1);

    AddEntityCollideCallback("Player", "Walk_Complete_Area", "FinishWalkQuest", true, 1);

    Addtimer("pianotimer", 0.1, "pianotimer");

    AddEntityCollideCallback("Player", "pianostop", "pianostop", true, 1);

}



void UsedKeyOnDoor(string &in asItem, string &in asEntity)

{

    SetSwingDoorLocked("SewersDoor", false, true);

    PlaySoundAtEntity("", "unlock_door", "SewersDoor", 0, false);

    RemoveItem("SewersKey");

}    



void Murder(string &in asParent , string &in asChild , int alState)

{

SetEntityActive("murder" , true);

}



void GetWalkQuest(string &in asParent, string &in asChild, int alState)

{

AddQuest("walkquest", "WalkQuest");

}



void FinishWalkQuest(string &in asParent, string &in asChild, int alState)

{

CompleteQuest("walkquest", "WalkQuest");

}



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", 0, true);

AddPropImpulse("piano", 0, 0, 100, "World");

PlaySoundAtEntity("piano", "break_wood", "piano", 0, false);

CreateParticleSystemAtEntity("", "ps_dust_impact.ps", "impact", false);

}





////////////////////////////

// Run when entering map

void OnEnter()

{



}



////////////////////////////

// Run when leaving map

void OnLeave()

{



}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-14-2012, 09:14 PM
Find
Bridge Offline
Posting Freak

Posts: 1,971
Threads: 25
Joined: May 2012
Reputation: 128
#3
RE: Amnesia Custom Story ERROR!

Perhaps the function's name is AddTimer and not Addtimer?
12-14-2012, 09:16 PM
Find
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#4
RE: Amnesia Custom Story ERROR!

OMG it fixed thanks alot guys i +rep you both!

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
12-14-2012, 09:33 PM
Website Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#5
RE: Amnesia Custom Story ERROR!

(12-14-2012, 09:16 PM)Bridge Wrote: Perhaps the function's name is AddTimer and not Addtimer?
Holy s**t, is true. Bridge, you have an amazing eye Tongue

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-14-2012, 09:49 PM
Find
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#6
RE: Amnesia Custom Story ERROR!

(12-14-2012, 09:49 PM)The chaser Wrote:
(12-14-2012, 09:16 PM)Bridge Wrote: Perhaps the function's name is AddTimer and not Addtimer?
Holy s**t, is true. Bridge, you have an amazing eye Tongue
That was the problem i also had : but has to be " i typed to fast i think but annyway thanks for you're help and time

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
12-15-2012, 10:22 AM
Website Find




Users browsing this thread: 2 Guest(s)