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
Development questions
LulleBulle Offline
Member

Posts: 101
Threads: 33
Joined: Feb 2012
Reputation: 0
#1
Development questions

1. How do I put a song through the entire story and which one is the Amnesia main one?
2. how do I create the effect that you like lie down on the floor?
3. How do I create the blue puzzle effect & sound?
4. how do I do "focus level door" text? Tried following instructions in level editor, failed.
(This post was last modified: 04-18-2012, 10:31 PM by LulleBulle.)
04-18-2012, 10:30 PM
Find
jamessnk1 Offline
Junior Member

Posts: 37
Threads: 6
Joined: Mar 2012
Reputation: 2
#2
RE: Development questions

(04-18-2012, 10:30 PM)LulleBulle Wrote: 1. How do I put a song through the entire story and which one is the Amnesia main one?
2. how do I create the effect that you like lie down on the floor?
3. How do I create the blue puzzle effect & sound?
4. how do I do "focus level door" text? Tried following instructions in level editor, failed.
I'll try and answer what I can.
1. If you have a .ogg file of the music and a .snt file for it you can just put the sound in each map right in level editor.
2. The lying down on the floor is when you trigger complete insanity I think, although I'm not sure how. If you open someone elses story and look at their script you can find out from there. You probably just give 100 sanity damage though.
3. That effect is when you return the sanity of the player. Which is simply:
GiveSanityBoost();

4. Do you mean have text show up when you look at the door? If so:
SetEntityPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt);
then as the function you would put:
void string& asCallback(void MyFunc(string &in asEntity, int alState)
{
SetMessage(string& asTextCategory, string& asTextEntry, float afTime);
}

hopefully this was at least a little helpful Smile im kinda new at this too haha

04-19-2012, 12:21 AM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#3
RE: Development questions

I'll elaborate on these a little.
(04-18-2012, 10:30 PM)LulleBulle Wrote: 1. How do I put a song through the entire story and which one is the Amnesia main one?
2. how do I create the effect that you like lie down on the floor?
3. How do I create the blue puzzle effect & sound?
4. how do I do "focus level door" text? Tried following instructions in level editor, failed.
1. Put the following script right in the OnStart section and the song will begin playing as soon as you start the game. If you choose a song that loops, it will keep going through the whole game.
Spoiler below!

PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);

Plays music.


asMusicFile - the music to play + extension .ogg
abLoop - determines whether a music track should loop
afVolume - volume of the music
afFadeTime - time in seconds until music reaches full volume
alPrio - priority of the music. Note that only the music with the highest priority can be heard! 0 - highest, 1 - lower, etc
2.There are two scripts that do this. The first one affects how the head tilts at different angles. The second one affects the position of the head itself on the body. Lying down usually means tilting the head to the side and lowering it to the floor. (You'll want to make sure to change these back to normal later)
Spoiler below!

void FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);

Rotates the position of the camera on the player's body.

afX - angle of rotation of head, positive being counter-clockwise
afSpeedMul - speed (possibly acceleration) multiplier of the rotation (default 1, which is really slow)
afMaxSpeed - maximum speed of rotation

void MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist);

Changes the position of the camera on the player's body.

afX - amount along the X-axis
afY - amount along the Y-axis
afZ - amount along the Z-axis
afSpeed - speed at which the change happens
afSlowDownDist - distance at which to start slowing down (prevents the head from abruptly stopping)
3. GiveSanityBoost(); makes the blue flash and sanity restoration, then use PlayMusic to play one of the "puzzle" .ogg's. Make sure it's a different priority than your background music, or else the background music won't turn back on afterwards.
4. I don't know what that is, so hopefully someone else knows.


(This post was last modified: 04-19-2012, 12:39 AM by Damascus.)
04-19-2012, 12:38 AM
Find




Users browsing this thread: 1 Guest(s)