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
HELP!!!
JPPSJ Offline
Junior Member

Posts: 20
Threads: 2
Joined: Apr 2012
Reputation: 0
#9
RE: HELP!!!

(04-17-2012, 12:37 AM)Putmalk Wrote: I am not going to teach you how to do flying jesus's, as it's very annoying and not scary at all.

What I am going to do is teach you how to slam your doors the way you want them to.

Okay, so, we have our basic script file. You need to remember that every line of code (minus the function headers such as "OnStart()", etc, must end in ";" (that tells the computer to move on to the next line of code). I'm not going to explain loops and stuff, that can be covered at a different time in a different thread.

So, our scenario: We want the player to come close to the door, and when he does, the door slams shut in his face! Included is a loud bang and a sanity drain.

Here we have a list of functions: http://wiki.frictionalgames.com/hpl2/amn..._functions

I could make you go down that list, but I'd rather just pinpoint all the functions we need.

AddEntityCollideCallback(string parentname, string childname, string function, bool deleteoncollide, int alStates);


GiveSanityDamage(float amount, bool UseEffects);

PlaySoundAtEntity(string soundname, string soundfile, string entity, float fadetime, bool savesound);


SetSwingDoorClosed(string name, bool closed, bool effects);

Those are all the functions we need to complete our task. I know this looks weird. What do these functions do?

AddEntityCollideCallback: We call this when the player touches another entity (such as a script area), and when he does, we fire a function with a name that we specify.

GiveSanityDamage: We deal a specific amount of sanity damage (good values: 5-20) to the player and we can choose whether to show an effect or not.

PlaySoundAtEntity: We play a sound from the sound folder in the Amnesia directory. We can set several values here, such as how fast it fades and where the sound is played.

SetSwingDoorClosed: We swing the door closed as fast as we can.

This is only step one of the process. Next post will detail how to use these functions in your script.
Ok, That makes sense...
04-17-2012, 12:39 AM
Find


Messages In This Thread
HELP!!! - by JPPSJ - 04-16-2012, 11:38 PM
RE: HELP!!! - by Putmalk - 04-17-2012, 12:01 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 12:06 AM
RE: HELP!!! - by MrIcabod123 - 04-17-2012, 12:12 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 12:14 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 12:19 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 12:27 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 12:37 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 12:39 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 12:46 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 12:52 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 12:53 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 12:57 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 12:59 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 01:01 AM
RE: HELP!!! - by Xanthos - 04-17-2012, 01:00 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 01:02 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 01:08 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 01:11 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 01:13 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 01:14 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 01:18 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 01:28 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 01:27 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 01:33 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 01:39 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 01:45 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 01:46 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 02:02 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 02:05 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 02:15 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 02:23 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 03:00 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 03:54 AM
RE: HELP!!! - by Putmalk - 04-17-2012, 04:05 AM
RE: HELP!!! - by JPPSJ - 04-17-2012, 04:14 AM
RE: HELP!!! - by Putmalk - 04-18-2012, 02:16 AM
RE: HELP!!! - by jessehmusic - 04-18-2012, 12:23 PM



Users browsing this thread: 1 Guest(s)