Frictional Games Forum (read-only)

Full Version: Some stuff...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
1. How do you create description on doors?
2. Is it the addEntityCollideCallback which is used when I wanna create a little thingy where the player enters a script area and a hatch above him flies open?
3. Can somone make/help me make an glass container, with yellow content, instead of green or red?

New to this, but I love to create stuff, just needs an extra kick to get started you know :p Thanks!
1. If you want a "look at" description use the:

void OnEnter()
{
SetEntityPlayerLookAtCallback("doorname", "LookAtDoor", false);
}

void LookAtDoor(string &in entity, int alState)
{
SetMessage(string& asTextCategory, string& asTextEntry, 0);
}
Hope you know how to use messages. I'm not really sure what you are asking for, so I hope this answers your question.

2. Yes, that would be correct.

3. I have made you a yellow chemical container and attached this picture
for you
[Image: s4lv6b.jpg]
Angel

http://dl.dropbox.com/u/20790433/chemica...Yellow.ent

If you want another model I could give that a go Rolleyes
Oh, thanks Smile And then I go into the .lang file and create a new category named... CATEGORY Name="Door"?
Ended up with Error "unexpected "{"" :o
Nice ^^ Learned something atleast!
Hahahaha, lol xD Awesome pic! xD But oh well, where do I put the little fella? :o (chemical container) Also, I am on a mac!
yeah, but you could name the category as your mapname (not meaning storyname, but mapname). Under that you can save all messages for that specific area. Then it becomes easier to see which message goes where.

Still an unexpected { ?

You could put the chemical container in your entities/items folder which is located in your amnesia directory. However as you are making a custom map, put it in: amnesia/custom stories/"your story"/entities/items, which will make it easier when sharing the map with other users! Smile
The yellow thingy looks awesome Big Grin Thanks!

So like this?
"<CATEGORY Name="TestStory">
<Entry Name="ItemDesc_mansion_1">A locked door.</Entry>
</CATEGORY>


"{
SetEntityPlayerLookAtCallback("doorname", "LookAtDoor", false);
}

void LookAtDoor(string &in entity, int alState)
{
SetMessage(string& asTextCategory, string& asTextEntry, 0);
}" this text here, can I place it anywhere in the script (under the OnEnter)?
And when I click the door it pops up a text saying "A locked door".
If you want a "click on object/door" use the:

void OnEnter()
{
SetEntityPlayerInteractCallback("Name of your door", "LockedDoor", false);
}


void LockedDoor(string &in entity)
{
SetMessage("TestStory", "ItemDesc_mansion_1", 0);
}


Yes you can place the "Void lockedDoor(string &in entity)" anywhere in the script, however - if you like some sort of order try to categorize your scripts. Either as a timeline, or by putting all item interactions at one place and other stuff at some place.. hope you get what I mean.

You can add comments by doing a:
// Locked door <------- my comment
Anything behind a "//" won't be recognized as a function or a script.
And, all script functions can be found here:
http://wiki.frictionalgames.com/hpl2/amn..._functions

They seem to have updated the page with information, making it easier to understand the scripts.
Got an error saying "Expected ")" or ","" when using your script :o What is wrong? Confused
check the hpl.log located at "my documents\amnesia\main". That log should give you the line and letter in your script file which is wrong.

example: 14, 0 Expected identifier ";"

Means that on line 14, letter 0 you have forgotten an ";".

So lookup where the fault is & post that part of the script Smile
Ooooh, cool! Thanks, that will help a lot!
Found out that I accidentally placed 1 space to much between 2 numbers xD
This was so long ago xD
But I was wondering if you could make so it actually looks yellow in the inventory, not only in the map? :o Looks a bit weird with the yellow turns to green o.O
Pages: 1 2