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
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


Messages In This Thread
Development questions - by LulleBulle - 04-18-2012, 10:30 PM
RE: Development questions - by jamessnk1 - 04-19-2012, 12:21 AM
RE: Development questions - by Damascus - 04-19-2012, 12:38 AM



Users browsing this thread: 1 Guest(s)