Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee


Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error message
Author Message
mr.bonent Offline
Junior Member

Posts: 47
Joined: May 2011
Reputation: 0
Post: #11
RE: error message

Ok, thanks!

Now I would like to get more informations about scripting.
Which types of areas are present?
How exactly works that with the monsters?
05-29-2011 12:55 AM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 911
Joined: Sep 2010
Reputation: 7
Post: #12
RE: error message

What do you mean by areas?

Monsters are located under Entities and then under Enemy.

When you place one and then select it, you can uncheck the active button.

Then it becomes activated when you have this command in your script. MonsterName represents the name of the monster.

SetEntityActive("MonsterName", true);

05-29-2011 01:00 AM
Find all posts by this user Quote this message in a reply
mr.bonent Offline
Junior Member

Posts: 47
Joined: May 2011
Reputation: 0
Post: #13
RE: error message

How does such a script look like? And where do I save it?
05-29-2011 01:09 AM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 911
Joined: Sep 2010
Reputation: 7
Post: #14
RE: error message

A custom story has many parts to it.

First, go to your amnesia the dark descent folder, find the "custom_stories" folder inside. Then create a folder there and, in this example, name it "Practice". In that folder, create a text document. Rename it to "custom_story_settings.cfg" Make sure that it doesn't end in ".txt", but in ".cfg". Inside the document, put this in there:

<Main
    ImgFile = ""
    Name = "The End Of Time"
    Author = "Author Name"
    
    MapsFolder = "maps/"
    StartMap = "practice.map"
    StartPos = "PlayerStartArea_1"
/>

Save the document and then create another document named "extra_english.lang" and once again make sure it ends in ".lang" and not ".txt". Open it and paste this into it and keep the capitalized letters the way they are.

<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">My custom story descript!</Entry>
</CATEGORY>
</LANGUAGE>

Save the document and then make a folder named "maps". In it, create a file named "Practice.hps" and it has to end in ".hps" and not ".txt".


In the "maps" folder, this is where the script goes (Practice.hps) and where the map goes (Practice.map) which both need to have the same names.

In the "Practice.hps" file, put this in there:

void OnStart()
{

}
void OnEnter()
{
}
void OnLeave()
{
}

Then you make the map and set the rest up for playability.

05-29-2011 01:30 AM
Find all posts by this user Quote this message in a reply
mr.bonent Offline
Junior Member

Posts: 47
Joined: May 2011
Reputation: 0
Post: #15
RE: error message

Ok I realls thank you for this! Smile
very helpfull.
Now how can I make new Items? And how can I make a monster apear in a room after entering a specific area?
05-29-2011 01:46 AM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 911
Joined: Sep 2010
Reputation: 7
Post: #16
RE: error message

I never tried making new items. But you can name the existing items in the editor with something else. Like a jar of acid and then calling it a jar of slime.

For your second question, try this.

void OnStart()
{
     AddEntityCollideCallback("Player", "ScriptArea_1", "Func01", true, 1);
}
void Func01(string &in asParent, string &in asChild, int alState)
{
     SetEntityActive("MonsterName", true);
}

05-29-2011 02:09 AM
Find all posts by this user Quote this message in a reply
mr.bonent Offline
Junior Member

Posts: 47
Joined: May 2011
Reputation: 0
Post: #17
RE: error message

Ah ok, thanks!
Em, where should I put that script in?
And which area got I to create in the Leveleditor ?
05-29-2011 02:21 AM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 911
Joined: Sep 2010
Reputation: 7
Post: #18
RE: error message

ScriptArea is used for collision and interaction.

It goes in your "Practice.hps" file.

05-29-2011 02:34 AM
Find all posts by this user Quote this message in a reply
mr.bonent Offline
Junior Member

Posts: 47
Joined: May 2011
Reputation: 0
Post: #19
RE: error message

Ok, thanks.

But there isn't anything happen. ^^
The monster which I place in the Leveleditor is inactive.
Thats right or not?
Can I let the function "Func01" as it is? Or have I to rename it?
05-30-2011 10:26 AM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 911
Joined: Sep 2010
Reputation: 7
Post: #20
RE: error message

The function name can be whatever you want.

Example:

void OnStart()
{
     AddEntityCollideCallback("Player", "ScriptArea_1", "FunctionWhatEverYouWant01", true, 1);
}
void FunctionWhatEverYouWant01(string &in asParent, string &in asChild, int alState)
{
     [whatever you want here]
}

05-30-2011 01:10 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)