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


Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Some stuff...
DannieWest Offline
Member

Posts: 156
Threads: 13
Joined: Apr 2011
Reputation: 0
#1
Some stuff...

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!
05-03-2011, 09:17 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#2
RE: Some stuff...

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

[Image: mZiYnxe.png]


05-03-2011, 11:00 PM
Find
DannieWest Offline
Member

Posts: 156
Threads: 13
Joined: Apr 2011
Reputation: 0
#3
RE: Some stuff...

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!
(This post was last modified: 05-04-2011, 06:43 AM by DannieWest.)
05-04-2011, 06:25 AM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#4
RE: Some stuff...

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

[Image: mZiYnxe.png]


(This post was last modified: 05-04-2011, 01:21 PM by Acies.)
05-04-2011, 01:20 PM
Find
DannieWest Offline
Member

Posts: 156
Threads: 13
Joined: Apr 2011
Reputation: 0
#5
RE: Some stuff...

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".
05-04-2011, 01:38 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#6
RE: Some stuff...

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.

[Image: mZiYnxe.png]


05-04-2011, 02:00 PM
Find
DannieWest Offline
Member

Posts: 156
Threads: 13
Joined: Apr 2011
Reputation: 0
#7
RE: Some stuff...

Got an error saying "Expected ")" or ","" when using your script :o What is wrong? Confused
05-08-2011, 02:36 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#8
RE: Some stuff...

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

[Image: mZiYnxe.png]


(This post was last modified: 05-08-2011, 03:38 PM by Acies.)
05-08-2011, 03:38 PM
Find
DannieWest Offline
Member

Posts: 156
Threads: 13
Joined: Apr 2011
Reputation: 0
#9
RE: Some stuff...

Ooooh, cool! Thanks, that will help a lot!
Found out that I accidentally placed 1 space to much between 2 numbers xD
05-08-2011, 03:45 PM
Find
DannieWest Offline
Member

Posts: 156
Threads: 13
Joined: Apr 2011
Reputation: 0
#10
RE: Some stuff...

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
06-01-2011, 03:48 PM
Find




Users browsing this thread: 1 Guest(s)