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
An eager newcomer who wants to learn...
C-zom Offline
Junior Member

Posts: 22
Threads: 3
Joined: Aug 2009
Reputation: 0
#1
An eager newcomer who wants to learn...

Hello! I am not new to the modding scene at all, and have a good grasp of HPL 2 in two days. So, this will not be a barrage of simple questions. In fact, the only reason I ask is because I hear the community is nice, and I can't find tutorials for this.

1: How do I create ambient noises in a level? This includes music or stuff like rain or humming. I cannot, for the life of me, figure it out.

2: Book creation! How do I make my own book like the diary pages of Daniel? Is there an extensive tutorial here for it? They will be narrated, so I need to know how to attatch .ogg's to them as well.

3: How do I polish up a "start" of a map? Like the screen fading in, a note or narration playing right away before the player has control, stuff like that? Right now I just "teleport" into my map and my narrations aren't working.

4: How do I make supplies carry over between levels? This is aggrevating me. All my tinderboxes and equipment reset per level_door usage.

Thanks so much for your time guys.

07-31-2011, 03:48 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: An eager newcomer who wants to learn...

http://www.frictionalgames.com/forum/thread-9264.html

Welcome back to school Smile

07-31-2011, 03:54 AM
Find
C-zom Offline
Junior Member

Posts: 22
Threads: 3
Joined: Aug 2009
Reputation: 0
#3
RE: An eager newcomer who wants to learn...

Aye, thanks mate. I will read it eagerly and willingly from top to bottom! I love this engine.
Okey doke, that solved all questions besides two!

3 and 1 were unanswered and still stand. Smile Anyone want to help me out with those?

(This post was last modified: 07-31-2011, 04:09 AM by C-zom.)
07-31-2011, 04:04 AM
Find
C-zom Offline
Junior Member

Posts: 22
Threads: 3
Joined: Aug 2009
Reputation: 0
#4
RE: An eager newcomer who wants to learn...

I add just one more question. How do I add multiple keys and doors into the same .hps file? Smile

07-31-2011, 06:35 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#5
RE: An eager newcomer who wants to learn...

Just add multiple instances of the code. If you want to have two keys open two doors, use the same script twice, with the appropriate entities matched up.

As to #3, it's in the reference thread. CTRL + F and look for 'faint' and it should take you to the mini-tutorial. Click the link to see a list of relevant functions I posted on a thread asking a similar question.

#1 is also there too, but on a different thread which the reference thread I posted leads to. Search for 'cool thing' and you should find the link. Click that and look for 'scary/spooky ambience' or something like that. That should give you a script structure to use for random ambience.

07-31-2011, 07:06 AM
Find
C-zom Offline
Junior Member

Posts: 22
Threads: 3
Joined: Aug 2009
Reputation: 0
#6
RE: An eager newcomer who wants to learn...

Alright, we're getting there!

Ambient sound is 99% done, that variation worked. However I can't figure out how to add my own music into the mix, want to give me some pointers?

Lastly, that "faint" script didn't help at ALL. I just want a diary entry to play immediately upon the game starting. If that can't be done, just a screen fade out to fade in would suffice, I couldn't trim that script out of the whole rolling/fainting mode.

07-31-2011, 08:18 AM
Find
MrCookieh Offline
Member

Posts: 157
Threads: 8
Joined: Jul 2011
Reputation: 0
#7
RE: An eager newcomer who wants to learn...

As far as I know, you can't show the player automatically a diary entry.
But you can easily make a Fade out/Fade in:

void OnStart(){
FadeOut(0);
AddTimer("", 3, "FadeIn");
}

void FadeIn(string &in asTimer){
FadeIn(3);
}

The Well: Descent - Take a look at it!
(This post was last modified: 07-31-2011, 09:10 AM by MrCookieh.)
07-31-2011, 09:10 AM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#8
RE: An eager newcomer who wants to learn...

This page shows you all the script functions.

http://wiki.frictionalgames.com/hpl2/amn..._functions

A script function is a series of commands built into one common job, or function. In AngelScript, the programming language that Amnesia uses, you can create your own functions. I also want to note that AngelScript is very similar to C++. A callback is a built in function that calls another function, in which is usually a functon you create. Every function has parameters that are needed to be told in a callback to correctly call the correct function.

void Function01()
{

}

Let's take apart this function. Its type is "void" in which it has no apparent type. Then there is the function name, which is "Function01". The parentheses at the end dictate what it includes in the function. It's blank so it has nothing added to it.

void Function01(string &in asEntity)
{

}

This has a parameter. It is a string, or text. It's name is "asEntity". Whatever asEntity holds in there can be used in the function for other built in callbacks.

07-31-2011, 01:09 PM
Find
C-zom Offline
Junior Member

Posts: 22
Threads: 3
Joined: Aug 2009
Reputation: 0
#9
RE: An eager newcomer who wants to learn...

(07-31-2011, 09:10 AM)MrCookieh Wrote: As far as I know, you can't show the player automatically a diary entry.
But you can easily make a Fade out/Fade in:

void OnStart(){
FadeOut(0);
AddTimer("", 3, "FadeIn");
}

void FadeIn(string &in asTimer){
FadeIn(3);
}

Hey man that looked good but it actually makes my custom story crash. Want to take a look to see whats wrong? I'm still learning the steps of the code.

http://i.imgur.com/NzIZ4.jpg

07-31-2011, 06:49 PM
Find
MrCookieh Offline
Member

Posts: 157
Threads: 8
Joined: Jul 2011
Reputation: 0
#10
RE: An eager newcomer who wants to learn...

You have to put the
AddUseItemCallback(...);
AddUseItemCallback(...);

into the void OnStart() function

The Well: Descent - Take a look at it!
07-31-2011, 06:56 PM
Find




Users browsing this thread: 1 Guest(s)