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


Thread Rating:
  • 3 Vote(s) - 4.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My problems
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#11
RE: My problems

"Ambience_main.ogg.sfk"? NEVER seen that one. Try erasing the .sfk and correcting the script:

void OnStart()

{

AddEntityCollideCallback("Player", "Play_Music_Script_Area", "PlayMusic1", true, 1);

}



void PlayMusic1(string &in asParent, string &in asChild, int alState)

{

PlayMusic("Ambience_main.ogg", true, 1, 1, 0, false);

}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-14-2012, 09:57 AM
Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
#12
RE: My problems

(10-14-2012, 09:57 AM)The chaser Wrote: "Ambience_main.ogg.sfk"? NEVER seen that one. Try erasing the .sfk and correcting the script:

void OnStart()

{

AddEntityCollideCallback("Player", "Play_Music_Script_Area", "PlayMusic1", true, 1);

}



void PlayMusic1(string &in asParent, string &in asChild, int alState)

{

PlayMusic("Ambience_main.ogg", true, 1, 1, 0, false);

}
Still doesn't work v_v , What if the .ogg files is not readable in the first place?
I turned it into .ogg file by renaming the file from .mp3 to .ogg ( i have show extensions option turned on ).
10-14-2012, 10:18 AM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#13
RE: My problems

Changing the file name or extension does not make changes to the content of the file. Giving an MP3 file an OGG extension will only confuse the game and fail silently in the background.

Tutorials: From Noob to Pro
10-14-2012, 10:22 AM
Website Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
#14
RE: My problems

(10-14-2012, 10:22 AM)Your Computer Wrote: Changing the file name or extension does not make changes to the content of the file. Giving an MP3 file an OGG extension will only confuse the game and fail silently in the background.
So you mean that was my problem?
If yes , how do i "transform" the file into .ogg without screwing up everyting?

EDIT: I used an online MP3-to-ogg converter and it worked!
(This post was last modified: 10-14-2012, 12:54 PM by naseem142.)
10-14-2012, 11:44 AM
Website Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#15
RE: My problems

You can use Audacity to make your own tracks. By that I mean making songs .ogg.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-14-2012, 01:13 PM
Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
#16
RE: My problems

(10-14-2012, 01:13 PM)The chaser Wrote: You can use Audacity to make your own tracks. By that I mean making songs .ogg.
I have audacity , i wanted to make a voice to speak with the messages poping-up , but my microphone is crappier than my voice ._.

I'v got a new problem :S
(This post was last modified: 10-14-2012, 02:05 PM by naseem142.)
10-14-2012, 01:45 PM
Website Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#17
RE: My problems

Looking at problem #2, that's intentional. Game design.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
10-15-2012, 05:28 AM
Website Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
#18
RE: My problems

How do i end the game when entering a level door?
where the credits come and then back to main menu
(This post was last modified: 10-18-2012, 02:54 PM by naseem142.)
10-18-2012, 02:54 PM
Website Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#19
RE: My problems

It's actually pretty easy, put this in void OnLeave():

StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum);



Starts the end credits screen.




asMusic - the music to play (including .ogg)


abLoopMusic - determines whether the music should loop


asTextCat - the category to be used in the .lang file (must be “Ending”)


asTextEntry - the entry in the .lang file (must be “MainCredits”)


alEndNum - Amnesia has 3 different endings and displays a code
at the bottom. Determines which code is displayed. 0-2 will display
codes, any other integer will not.

So, you can do that or this:
void SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);



Calls a function when the player interacts with a certain entity.


Callback syntax: void MyFunc(string &in asEntity)




asName - internal name


asCallback - function to call


abRemoveOnInteraction - determines whether the callback should be removed when the player interacts with the entity

So, it could be this:
////Stuff
void OnLeave()
{
StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum);
}
Or this:
///Stuff
SetEntityPlayerInteractCallback("door", "LOL", true);

void LOL (string &in asEntity)
{
StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum);
}
And this is it. Hope it helps.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
(This post was last modified: 10-18-2012, 03:09 PM by The chaser.)
10-18-2012, 03:09 PM
Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
#20
RE: My problems

I'm sure i need to put something in extra_english.lang for the credits text , but what is it?
10-18-2012, 04:10 PM
Website Find




Users browsing this thread: 1 Guest(s)