Frictional Games Forum (read-only)
Need various information - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Need various information (/thread-8241.html)

Pages: 1 2 3


RE: Need various information - Kyle - 05-27-2011

It should work. :/


RE: Need various information - KenOfAllTrades - 05-27-2011

You left out a } by the end of the script, so I fixed it. But can't you just tell me what was wrong with my last one? I can't understand the script anymore :v

EDIT: A lot of :v's I make up in here

2ND EDIT: Nevermind, I found the mistake. I had just copypasted something from the forum that was apparently wrong


RE: Need various information - KenOfAllTrades - 05-28-2011

Okay, I ask for help once again. Hope you don't mind :<

Code:
OnStart()
{
SetEntityPlayerInteractCallback("lantern_1", "Monster1", true);
}


void Monster1(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
SetEntityActive("servant_grunt_1", true);
AddTimer("Monster", 4, "Monster2");
}

void Monster2(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEntityCollideCallback("servant_grunt_1", "PathNodeArea_2", "Leave1", true, 1);
}

void Leave1(string &in asParent, string &in asChild, int alState)
{
     SetEntityActive("servant_grunt_1", false);
    SetEntityActive("Sound_1", true);
    AddTimer("Doorclose", 3.5, "Doorclosed");
}

void Doorclosed(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("Sound_1", false);
}

I've tried looking through the script but I can't find out what's wrong. When I start it, it just says "FATAL ERROR: Could not load script file 'custom_stories/Test/maps/Cellar.hps'! main (1, 8) : ERR : Expected identifier"

And instead of correcting my script, can you tell me what I did wrong so I can learn from my mistake?


RE: Need various information - Kyle - 05-28-2011

You forgot "void" on the first line.

Should be:

void OnStart()


RE: Need various information - KenOfAllTrades - 05-28-2011

Ah! Can't believe I forgot that! Thank you once again, you have NO IDEA how I appreciate you and everyone else's help!!


RE: Need various information - Kyle - 05-28-2011

(05-28-2011, 09:08 PM)KenOfAllTrades Wrote: Ah! Can't believe I forgot that! Thank you once again, you have NO IDEA how I appreciate you and everyone else's help!!

Just doing my job.

:p


RE: Need various information - KenOfAllTrades - 05-30-2011

Okay, so once again I call upon ye! How do I make custom entities show up in the level editor? And where do I have to put them in my custom story folder when I want to upload the story?


RE: Need various information - Kyle - 05-30-2011

(05-30-2011, 07:08 PM)KenOfAllTrades Wrote: Okay, so once again I call upon ye! How do I make custom entities show up in the level editor? And where do I have to put them in my custom story folder when I want to upload the story?

In your "Amnesia The Dark Descent" folder, go to the "entities" folder, then go to were the custom entity would follow under. Then create a folder in there that has the name of your custom entity. Then put your custom entity files in there. The you can do whatever you want with that custom entity in the editor. Smile


RE: Need various information - KenOfAllTrades - 05-30-2011

Capital!! I tried putting the .ent in entities, not in a folder in entities! Thanks once again! You're a life-saver!!


RE: Need various information - Kyle - 05-30-2011

(05-30-2011, 10:32 PM)KenOfAllTrades Wrote: Capital!! I tried putting the .ent in entities, not in a folder in entities! Thanks once again! You're a life-saver!!

Wow, I'm only 13 and I'm saving lifes now! Sweet! :p