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
How to end custom story as a Demo?
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#1
How to end custom story as a Demo?

Ok.. Is there a way to end a custom story by going through a level door?
Ex: You have a key to a level door, you unlock it, you click to enter it, then the end credits load, is it possible? I have a feeling it might be.
07-11-2011, 05:09 AM
Find Reply
GraphicsKid Offline
Senior Member

Posts: 258
Threads: 34
Joined: Dec 2010
Reputation: 3
#2
RE: How to end custom story as a Demo?

Just make it go to a level that consists of nothing but the credits.
07-11-2011, 05:38 AM
Find Reply
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#3
RE: How to end custom story as a Demo?

Hmm.. That could work Tongue
hmm... FATAL ERROR
No matching signature

/////////////////////////////
// Run first time starting map
void OnStart()
{
StartCredits("01_amb_darkness.ogg", false, "MainCredits", 1);
}


////////////////////////////
// Run when entering map
void OnEnter()
{

}


////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Well? Everything matches up right in the .lang file.

and let's just say I was using my own music, I would need to make a music folder and put the .ogg in there right?
(This post was last modified: 07-11-2011, 07:01 AM by Zypherzemus.)
07-11-2011, 06:35 AM
Find Reply
triadtimes Offline
Senior Member

Posts: 508
Threads: 16
Joined: Jan 2011
Reputation: 21
#4
RE: How to end custom story as a Demo?

The Start Credits line is:
StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum);
You're missing either the text category or the entry.

07-11-2011, 04:48 PM
Find Reply
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#5
RE: How to end custom story as a Demo?

I fixed that and the map loads, but the credits themselves won't start, the music play though.
07-11-2011, 07:05 PM
Find Reply
triadtimes Offline
Senior Member

Posts: 508
Threads: 16
Joined: Jan 2011
Reputation: 21
#6
RE: How to end custom story as a Demo?

Is the screen black when the music plays? If so then the credits are working fine but there may be something wrong with your .lang file.

07-11-2011, 07:25 PM
Find Reply
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#7
RE: How to end custom story as a Demo?

Nope, the map itself actually loads. I had to put a floor so I wouldn't die when I spawn.

<LANGUAGE>
    <RESOURCES>
    </RESOURCES>
    <CATEGORY Name="CustomStoryMain">
        <Entry Name="Description">State Police of the Province of Brandenburg, 1842.[br]

You (A Private Detective) have been assigned to investigate disappearances, as well as "Demonic" sightings and possible Murders, of students at a nearby University, outside of Brandenburg.

Reports state that the last known Dean to have worked there, before this chaos started, was named Isaac Lloyd. Earlier reports state that Lloyd was involved in the "Alchemy Conspiracy" along with the notorious mastermind himself, Alexander.[br]

Your job: Find out what caused this mess, and stop it if possible.</Entry>
    </CATEGORY>
    <CATEGORY Name="Journal">
        <Entry Name="Note_keywardennote_Name">Key Warden's Note</Entry>
        <Entry Name="Note_keywardennote_Text">Hello and Welcome Detective. I Nathaniel, the Key Warden, have left you some supplies on the table next to this note, please do not lose that lantern, it's my only one, and traveling around in this building without it could lead to serious "consequences". Please do be careful, I've left almost all of the rooms untouched, and who knows what's in them. [br] [br] Also, I'm terribly sorry but, I've seemed to have missplaced some of the keys to the locked doors, I've tried looking everywhere but couldn't find them. Maybe you can? [br] [br] Cheers, [br] Nathaniel</Entry>
        <Entry Name="Note_psycholprofnote_Name">Dr. Lloyd</Entry>
        <Entry Name="Note_psycholprofnote_Text">Dr. Lloyd, the Dean, seems pretty odd to me, he often comes into my classroom during lectures and just watches the students. It also surprises me that he's the head scientist down in the laboratory. I'm sure he's pretty masterful on the subject of science, but I still wonder sometimes, is he really who he says he is?</Entry>
        <Entry Name="Note_secretarynote_Name">In All My Years...</Entry>
        <Entry Name="Note_secretarynote_Text">In all my years of working at this University.. I've never felt so.. Down; dark; afraid. There's something about that man, Isaac Lloyd, that I don't like one bit. If I had my way and I became the Dean, this University would have been moved, building a school over an old experimentation lab? Not such a good idea. It's not my choice though, I'll just do what Dr. Lloyd says for now, it's all I can do.</Entry>
        <Entry Name="Note_geographyprofnote_Name">The Science Dept.</Entry>
        <Entry Name="Note_geographyprofnote_Text">I don't like any of the teachers down in the Science Department. They seem.. out of place, like they don't belong. Dr. Lloyd also frightens me, though I am grateful to him for giving me the Geography Teachers position, he really did save me from going into debt. Thus, I am loyal to him.</Entry>
        <Entry Name="Note_johnsdiary_Name">John's Diary 1/5</Entry>
        <Entry Name="Note_johnsdiary_Text">25 August 1841.[br] [br] I've just enrolled at this prestigious school a few miles outside of Brandenburg, and strange things are occuring. I hear cries of terror late at night, my roomate does nothing but merely states that "Oh, it's just the wind". I find that hard to believe, I bet he knows something I don't. What it is? I'm not sure.</Entry>
         <Entry Name="Note_johnsdiary_2_Name">John's Diary 2/5</Entry>
        <Entry Name="Note_johnsdiary_2_Text">17 November 1841.[br] [br] It's been 3 months since I arrived here.. and It's been Hell! I believe I'm going insane from all of this.. this.. CHAOS! My roomate disappeared without a trace! I've tried to return home, but the damn Dean, Lloyd, won't allow me.. I'm trapped, with no where to go, I've decided to investigate these weird occurances.</Entry>
         <Entry Name="Note_johnsdiary_3_Name">John's Diary 3/5</Entry>
        <Entry Name="Note_johnsdiary_3_Text">21 November 1841.[br] [br] Some of the Professors have been watching me.. I hear experiments have been conducted here long in the past, but was stopped when this building was constructed into the University it now is. I wonder if those experiments are still being conducted.. I don't want to find out.</Entry>
         <Entry Name="Note_johnsdiary_4_Name">John's Diary 4/5</Entry>
        <Entry Name="Note_johnsdiary_4_Text">1 December 1841.[br] [br] My slow progressing investigations have led me to enter the Girl's Dromitry. Now I know that would be going against the rules, as well as my beliefs, but I bet there's something there that could really help me find out what's going on. I believe Peter has hidden a key in his room, I hear he visits the their dorm late at night, that bastard!</Entry>
         <Entry Name="Note_johnsdiary_5_Name">John's Diary 5/5</Entry>
        <Entry Name="Note_johnsdiary_5_Text">31 December 1841.[br] [br] Yes! Yes! YES! I've seen it! I know I shouldn't be so excited over seeing something horrible, but I've seen it! Right now, I'm staring at some.. demonic like creature, it's very fascinating... no... No.. No, no NO, NO!! it sees me! Dammit.. I HAVE to "RUN"</Entry>
        <Entry Name="Quest_KeyQuest_Text">Find the East Wing Key</Entry>
        <Entry Name="Quest_KitchenKeyQuest_Text">Find the Kitchen Key</Entry>
        <Entry Name="Note_lloydnote_1_Name">This University</Entry>
        <Entry Name="Note_lloydnote_1_Text">This place is simply fascinating! [br] Perfect for a secure hub for what I've been working these past few years. My colleage and best friend will soon be back in the flesh if all goes well with my plan!</Entry>
        <Entry Name="Note_lloydnote_2_Name">Progress Report 1/6</Entry>
        <Entry Name="Note_lloydnote_2_Text">26 January 1841. [br] [br] I have to keep a low profile about all of this, every Professor down in the Science Dept. has agreed to assist me in my work, rather surprising actually, they also seem to be drawn to the thought of "Resurrection". This just greatly improves my chances of succeeding!</Entry>
        <Entry Name="Note_lloydnote_3_Name">Progress Report 2/6</Entry>
        <Entry Name="Note_lloydnote_3_Text">7 Februrary 1841. [br] [br] We have started the experiments. Unfortunately, our test subjects are students themselves.. This is a risk I am willing to take, for Alexander's sake. The first subject, a young male named Toby, died from extreme amounts of Amnesia. This was partially due to his illness he was born with, we're not sure what it was, but from now on, we've decided to only use healthy individuals.</Entry>
        <Entry Name="Note_lloydnote_4_Name">Progress Report 3/6</Entry>
        <Entry Name="Note_lloydnote_4_Text">23 April 1841. [br] [br] We have created.. something. I'm not sure what, but I can say this was a failed attempt, while "it" was still unconcious, we quickly locked "it" up tight, making sure no one found out about this but now, Every night is filled with ear piercing screams of terror.</Entry>
        <Entry Name="Note_lloydnote_5_Name">Research On Hiatus (Until further notice)</Entry>
        <Entry Name="Note_lloydnote_5_Text">28 July 1841. [br] [br] That lab... is.. Now unsafe, I have personally sealed it with the one of the only keys available. Those things are going mad down there.. Maybe this wasn't such a good idea? I feel like I'm being hunted, this is insane. I should've never thought of trying to "revive" the dead. Alexander is gone, and that's the end of it. Tonight, I will take my last trip down into the lab, retrieve all of the research we have been working on, and then destroy it all!</Entry>
        <Entry Name="Note_daniellenote_1_Name">Danielle's Diary (1/4)</Entry>
        <Entry Name="Note_daniellenote_1_Text">31 October 1841. [br] [br] It's halloween diary, I had to purchase a new one of you since my old one is now completely filled. Surprising isn't it? Anyway, I made 4 new friends today, they all seemed very nice and I really do enjoy their company. Especially Julie, She could be a canidate for a best friend? We'll see. Things around here are getting extremely weird though, strange noises are heard throughout the night. It really gives me the creeps, I really am curious to know what's going on. There are rumors that a girl went missing a week ago, I don't know how true that is since Freshmen aren't allowed upstairs, but I still am curious.</Entry>
        <Entry Name="Note_daniellenote_2_Name">Danielle's Diary (2/4)</Entry>
        <Entry Name="Note_daniellenote_2_Text">21 December 1841. [br] [br] Today, I went upstairs... I saw a grusome sight.. A doorway.. completely covered in blood.. The door was locked, with no key to be found anywhere.. Our dorm president has deemed that upstairs was completely off-limits to anyone but the Professors and The Dean. I'm flabbergasted... what in the world is going on at this University?? Is it even a University? I heard it used to be some lab.. I know there's a science lab downstairs, but I don't have that course this year.. I really don't want to be here anymore.. I've ACTUALLY noticed people disappearing.. My only choice is to pray to God.. </Entry>
        <Entry Name="Note_daniellenote_3_Name">Danielle's Diary (3/4)</Entry>
        <Entry Name="Note_daniellenote_3_Text">29 December 1841. [br] [br] Oh My God... I can't believe what I just witnessed.. A girl.. Was being dragged... Literally.. down the hallway upstairs.. blood was everywhere... her screams were terrible.. I didn't see what was dragging her.. but it's sillhouette was very large.. I ran to where I am now.. I'm literally moving every piece of furniture in front of the door, I'll hide somewhere where I could quickly escape.. This is insane... Where is everyone??</Entry>
        <Entry Name="Note_daniellenote_4_Name">Danielle's Diary (4/4)</Entry>
        <Entry Name="Note_daniellenote_4_Text">1 Janurary 1842. [br] [br] Oh God... please.. help.. I can't live like this anymore, I'm breaking down into tears.. All of my friends have suddenly disappeared.. I don't know where or why.. Last night, I heard something so frightening.. It sounded so evil and I just couldn't take it... Right now, I'm hiding in this wardrobe.. I'm so afraid.. Maybe that boy I saw last week could help.. just someone ple.. (the note is cut off abruptly as though something prevented Danielle from continuing)</Entry>
        <Entry Name="Note_johnsdiary_6_Name">John's Diary (1/1)</Entry>
        <Entry Name="Note_johnsdiary_6_Text">1 Janurary 1842. [br] [br] I sucessfully aquired the key to Dr. Lloyd's office... OH.. MY.. GOD... WHAT THE HELL WAS THAT?!... OH SHI.. (The note cuts off abruptly)</Entry>
    </CATEGORY>
        <CATEGORY Name="Inventory">
            <Entry Name="ItemDesc_eastwingkey">Key that unlocks the East Wing Door</Entry>
            <Entry Name="ItemName_eastwingkey">East Wing Key</Entry>
            <Entry Name="ItemDesc_dinningroomkey">Key that unlocks the Dinning Room</Entry>
            <Entry Name="ItemName_dinningroomkey">Dinning Room Key</Entry>
            <Entry Name="ItemDesc_kitchenkey">Key that unlocks the Kitchen Door</Entry>
            <Entry Name="ItemName_kitchenkey">Kitchen Key</Entry>
            <Entry Name="ItemDesc_peterskey">Peter's Room Key</Entry>
            <Entry Name="ItemName_peterskey">Peter's Key</Entry>
            <Entry Name="ItemDesc_girlsdormkey">Key that unlocks the Girl's Dorm</Entry>
            <Entry Name="ItemName_girlsdormkey">Girl's Dorm Key</Entry>
            <Entry Name="ItemDesc_labkey">Silver key with the letters "LAB" embeded into it</Entry>
            <Entry Name="ItemName_labkey">Silver Key</Entry>
            <Entry Name="ItemDesc_northcoridoorkey">A small key.</Entry>
            <Entry Name="ItemName_northcoridoorkey">Small Key.</Entry>
            <Entry Name="ItemDesc_upstairskey">another small key.</Entry>
            <Entry Name="ItemName_upstairskey">Small Key.</Entry>
            <Entry Name="ItemDesc_lloydskey">A small key with the initials "I.L" engraved.</Entry>
            <Entry Name="ItemName_lloydskey">Small Office Key </Entry>
            <Entry Name="ItemDesc_brutekey">Yet another small key.</Entry>
            <Entry Name="ItemName_brutekey">Small Key.</Entry>
    </CATEGORY>
        <CATEGORY Name="Ending">
            <Entry Name="MainCredits">Vicarious Insanity (Demo) [br] [br]  I hope you had some sort of enjoyment out of this Very short demo. I created everything, and (with help from the Frictional Games forum) scripted everything, If it sucks, I know, it's my first custom story.. So yeah. Laterz. [br] Snuffalofagus</Entry>
    </CATEGORY>
        <CATEGORY Name="Levels">
            <Entry Name="girlsdormdoor"> Girl's Dorm</Entry>
            <Entry Name="labdoor"> Laboratory</Entry>
            <Entry Name="boysdormdoor"> Boy's Dorm</Entry>
            <Entry Name="mainhalldoor"> Main Hall</Entry>
    </CATEGORY>
        <CATEGORY Name="Message">
            <Entry Name="lablocked">It's locked. I have to find the key.</Entry>
            <Entry Name="girlsdormlocked">Locked. I need a key.</Entry>
            <Entry Name="lloydsdoor">It's locked. This must be Lloyd's Office.</Entry>
            <Entry Name="lloydsdooropen"></Entry>
    </CATEGORY>
</LANGUAGE>

/////////////////////////////
// Run first time starting map
void OnStart()
{
StartCredits("01_Vicarious.ogg", false, "Ending", "MainCredits", 1);
}


////////////////////////////
// Run when entering map
void OnEnter()
{
StartCredits("01_Vicarious.ogg", false, "Ending", "MainCredits", 1);
}


////////////////////////////
// Run when leaving map
void OnLeave()
{

}

I put the command in both the OnStart and OnEnter section to see if I got any results, nothing.
07-11-2011, 07:32 PM
Find Reply
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#8
RE: How to end custom story as a Demo?

????? I really need help with this guys D:
07-12-2011, 09:33 PM
Find Reply
Janni1234 Offline
Member

Posts: 134
Threads: 24
Joined: Jan 2011
Reputation: 1
#9
RE: How to end custom story as a Demo?

Or try :
void OnStart()
{
AddTimer("Timer", 1.0f, "end");
}

void end(string &in asTimer)
{
FadeOut(2);
AddTimer("Timer", 1.0f, "message");
}

void message(string &in asTimer)
{
SetMessage("message", "message1", 3.0f);
AddTimer("Timer", 3.5f, "menu");
}

void menu(string &in asTimer)
{
ChangeMap("menu_bg.map", "CameraPos", "", "");
}

Try that.If it not works...im sorry.
07-13-2011, 09:26 PM
Find Reply
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#10
RE: How to end custom story as a Demo?

Make a script area where you want the player to stop playing your map
and use this code

void OnStart()
{
AddEntityCollideCallback("Player", "script_credits", "func_credits", true, 1);
}

void func_credits(string &in asParent, string &in asChild, int alState)
{
StartCredits("01_amb_darkness.ogg", false, "MainCredits", 1);
}
change script_credits to the name of the area you're gonna create.

[Image: 44917299.jpg]Dubstep <3
07-14-2011, 03:11 AM
Find Reply




Users browsing this thread: 1 Guest(s)