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
Trigger Cave In
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#11
RE: Trigger Cave In

By the way, where you have StartCredits, I must note that the FadeOut above it won't work because it immediately skips to the credits. If you want it to fade out for 1 second before that, you need to add a 1 second timer before StartCredits is called.

06-09-2016, 07:41 AM
Find
Xallikk Offline
Junior Member

Posts: 35
Threads: 7
Joined: Jun 2016
Reputation: 0
#12
RE: Trigger Cave In

I do have an entry for it and everything else works.
<CATEGORY Name="Credits">
<Entry Name="Ending">Thanks for playing![br][br] Hope it actually worked and you enjoyed it![br] You can skip by hitting escape or clicking
[br][br] Made by DJ Allen[br] Tools used: Amnesia level and material editors[br] Sounds used: Level editor and YouTube</Entry>
</CATEGORY>
</LANGUAGE>

Also for the fadeout timer, would this work?

void OnStart()
{
AddTimer("scare", 3, "TimerPlayerReact");
AddTimer("breath", 4.5, "TimerPlayerReact");
AddTimer("breath", 6.5, "TimerPlayerReact");
AddTimer("saw3", 12, "TimerTorture");
AddTimer("saw_voice3", 11, "TimerTorture");
AddEntityCollideCallback("Player", "kista1", "kista1", true, 1);
AddEntityCollideCallback("Player", "scr_rockfall", "rockfall_1", true, 1);
AddEntityCollideCallback("Player", "scr_rockfall", "subtitles", true, 1);
}

void subtitles(string &in asParent, string &in asChild, int alState)
{
AddEffectVoice("OutroSound", "", "Subtitles", "LastWords", true, "Player", 5, 10);
}
void rockfall_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("CaveIn", true);
CreateParticleSystemAtEntity("rocksmoke1", "ps_impact_dust_high.ps", "rocksmoke_1", false);
CreateParticleSystemAtEntity("rocksmoke2", "ps_impact_dust_high.ps", "rocksmoke_2", false);
CreateParticleSystemAtEntity("rocksmoke3", "ps_impact_dust_high.ps", "rocksmoke_3", false);
CreateParticleSystemAtEntity("rocksmoke4", "ps_impact_dust_high.ps", "rocksmoke_4", false);
CreateParticleSystemAtEntity("rocksmoke5", "ps_impact_dust_high.ps", "rocksmoke_5", false);
CreateParticleSystemAtEntity("rocksmoke6", "ps_impact_dust_high.ps", "rocksmoke_6", false);
CreateParticleSystemAtEntity("rocksmoke7", "ps_impact_dust_high.ps", "rocksmoke_7", false);
PlaySoundAtEntity("cavein", "explosion_rock_large.snt", "Player", 0.01f, false);
AddTimer("TimerEndGame", 15, "Exit");
}

void Exit(string &in asEntity)
{
AddTimer("TimerCredits", 2, "Credits");
StartCredits("OutroTheme.ogg", false, "Credits", "Ending", 3);
}

void TimerCredits(string &in asTimer)
{
FadeOut(2);
}
void kista1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("maidenopen", true);
SetEntityActive("maidenclosed", false);
CreateParticleSystemAtEntity("", "ps_iron_maiden_event_smoke.ps", "ScriptArea_1", false);
PlaySoundAtEntity("maidenopen", "24_iron_maiden", "maidenopen", 0, false);
StartScreenShake(0.3, 0.3, 0, 0.3);
AddPlayerSanity(-10);
}

void TimerPlayerReact(string &in asTimer)
{
PlayGuiSound("react_" + asTimer, 0.6);
}

void TimerTorture(string &in asTimer)
{
PlayGuiSound("23_" + asTimer, 0.6);
}

void TimerCredits(string &in asTimer)
{
FadeOut(2);
}

The ones at the front always die first...
(This post was last modified: 06-09-2016, 06:21 PM by Xallikk.)
06-09-2016, 06:17 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#13
RE: Trigger Cave In

Switch those two functions for your fade out to this (also the timer arguments)

PHP Code: (Select All)
void Exit(string &in asEntity)
{
    
AddTimer("Credits"2"TimerCredits");
    
FadeOut(2);
}

void TimerCredits(string &in asTimer)
{
    
StartCredits("OutroTheme.ogg"false"Credits""Ending"3);


06-10-2016, 02:58 PM
Find
Xallikk Offline
Junior Member

Posts: 35
Threads: 7
Joined: Jun 2016
Reputation: 0
#14
RE: Trigger Cave In

I got that fixed, but I still can't figure out whats wrong with the subtitles

The ones at the front always die first...
06-11-2016, 02:00 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#15
RE: Trigger Cave In

You're never posted your "Subtitles" section from your lang file. That might be interesting to look at.

06-12-2016, 05:45 AM
Find
Xallikk Offline
Junior Member

Posts: 35
Threads: 7
Joined: Jun 2016
Reputation: 0
#16
RE: Trigger Cave In

This is it so far, I plan to add more if it works.

<CATEGORY Name="Subtitles">
<Entry Name="LastWords">Oh god, I'm going to die in here...</Entry>
</CATEGORY>

The ones at the front always die first...
06-12-2016, 06:29 AM
Find
Xallikk Offline
Junior Member

Posts: 35
Threads: 7
Joined: Jun 2016
Reputation: 0
#17
RE: Trigger Cave In

BTW I have to be done this project in the next 24 hours, so a reply soon would be really cool.

The ones at the front always die first...
06-12-2016, 09:48 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#18
RE: Trigger Cave In

You probably should post your entire lang file. Maybe your category is within another category, which won't work. I suppose the issue could also be that it doesn't find your OutroSound and thus doesn't play it and skips the text. Do you have custom_stories added to your resources.cfg file in the root folder of Amnesia?
You can try opening hpl.log in Documents\Amnesia\Main and read it after attempting to run the code. If an error occurs, it usually says so in the log.

(This post was last modified: 06-12-2016, 10:53 PM by Mudbill.)
06-12-2016, 10:50 PM
Find
Xallikk Offline
Junior Member

Posts: 35
Threads: 7
Joined: Jun 2016
Reputation: 0
#19
RE: Trigger Cave In

Here's the resources file. It doesn't look like it was added.
<Resources>
<Directory Path="/_temp" AddSubDirs="true" />
<Directory Path="/fonts" AddSubDirs="false" />
<Directory Path="/maps" AddSubDirs="true" />
<Directory Path="/textures" AddSubDirs="true" />
<Directory Path="/models" AddSubDirs="true" />
<Directory Path="/gui" AddSubDirs="true" />
<Directory Path="/static_objects" AddSubDirs="true" />
<Directory Path="/sounds" AddSubDirs="true" />
<Directory Path="/main_menu" AddSubDirs="true" />
<Directory Path="/shaders" AddSubDirs="true" />
<Directory Path="/lights" AddSubDirs="true" />
<Directory Path="/billboards" AddSubDirs="true" />
<Directory Path="/entities" AddSubDirs="true" />
<Directory Path="/graphics" AddSubDirs="true" />
<Directory Path="/viewer" AddSubDirs="true" />
<Directory Path="/particles" AddSubDirs="true" />
<Directory Path="/models" AddSubDirs="true" />
<Directory Path="/music" AddSubDirs="true" />
<Directory Path="/flashbacks" AddSubDirs="true" />
<Directory Path="/textures" AddSubDirs="true" />
<Directory Path="/misc" AddSubDirs="true" />
<Directory Path="/commentary" AddSubDirs="true" />
</Resources>

Also here is the lang file:
<LANGUAGE>

<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Find the key in each level to win the game. Enjoy!</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Note_Note1_Name">Last Words</Entry>
<Entry Name="Note_Note1_Text">Whoever's reading this...[br][br] There's something out there. It got Simon...
I can still hear his screams as that thing tore him apart. Elizabeth, Belmont, and I have hid in our hotel room, but I fear we are not safe here. I can hear it scratch the wall and the footsteps echoing down the hall. Oh no, something's
coming.[br][br]Oh god... it's trying to get through the door!</Entry>
<Entry Name="Note_Note2_Name">Wakey wakey!</Entry>
<Entry Name="Note_Note2_Text">Hey sleepy head! Belmont, Simon, Cristopher, and I have gone downstairs to the lobby to get some breakfast.
Join us when you get up!</Entry>
<Entry Name="Note_Note3_Name">The basement</Entry>
<Entry Name="Note_Note3_Text">Whatever that thing is... it came from below.[br][br] We were in the hallway when the
elevator doors opened.[br]The rest of the group managed to make it upstairs. I... was not so lucky. Whoever reads this,
please...[br]get out of here, before it kills you too. Take the elevator, it will take you to the lobby and to safety...
[br]Tell them what happened here, and kill that monster...</Entry>
</CATEGORY>

<CATEGORY Name="Loading">
<Entry Name="LoadScreen1">I should go meet up with the others.</Entry>
<Entry Name="LoadScreen2">I need to find my friends, fast!</Entry>
<Entry Name="LoadScreen3">Oh god, I need to get out of here!</Entry>
<Entry Name="LoadScreen4">What a strange dream. I wonder what it means...</Entry>
<Entry Name="LoadScreen5">I have to tell someone about this...</Entry>
<Entry Name="LoadScreen6">Oh no, I'm heading down to where that monster came from...</Entry>
</CATEGORY>

<CATEGORY Name="Subtitles">
<Entry Name="LastWords">Oh god, I'm going to die in here...</Entry>
</CATEGORY>

<CATEGORY Name="Sign">
<Entry Name="Door1">It's locked.</Entry>
<Entry Name="Room405">Room 405</Entry>
<Entry Name="Room401">Room 401</Entry>
<Entry Name="Room403">Room 403</Entry>
<Entry Name="LevelDoor2">It's locked.</Entry>
<Entry Name="LevelDoor3">It's locked.</Entry>
<Entry Name="LevelDoor1">It's locked.</Entry>
<Entry Name="Room301">Room 301</Entry>
<Entry Name="Room304">Room 304</Entry>
<Entry Name="Room306">Room 306</Entry>
<Entry Name="Room308">Room 308</Entry>
<Entry Name="Room303">Room 303</Entry>
<Entry Name="Room305">Room 305</Entry>
<Entry Name="Room302">Room 302</Entry>
<Entry Name="Room201">Room 201</Entry>
<Entry Name="Room203">Room 203</Entry>
<Entry Name="Room205">Room 205</Entry>
<Entry Name="Room207">Room 207</Entry>
<Entry Name="Room204">Room 204</Entry>
<Entry Name="Room206">Room 206</Entry>
<Entry Name="Room208">Room 208</Entry>
<Entry Name="Room106">Room 106</Entry>
<Entry Name="Room104">Room 104</Entry>
<Entry Name="Room107">Room 107</Entry>
<Entry Name="Room105">Room 105</Entry>
<Entry Name="Room103">Room 103</Entry>
<Entry Name="Room101">Room 101</Entry>
<Entry Name="Room102">Room 102</Entry>
</CATEGORY>

<CATEGORY Name="Levels">
<Entry Name="Door1">2nd Floor</Entry>
<Entry Name="LevelDoor2">1st Floor</Entry>
<Entry Name="LevelDoor3">Elevator</Entry>
</CATEGORY>

<CATEGORY Name="LevelDoors">
<Entry Name="levelDoorName"></Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemName_KeyDesc">Room Key</Entry>
<Entry Name="ItemDesc_KeyDesc">It's the key for my room.</Entry>
<Entry Name="ItemName_KeyDes">3rd Floor Key</Entry>
<Entry Name="ItemDesc_KeyDes">It's for unlocking the 3rd floor door.</Entry>
<Entry Name="ItemName_2ndKeyDesc">2nd Floor Key</Entry>
<Entry Name="ItemDesc_2ndKeyDesc">It's for unlocking the 2nd floor door.</Entry>
<Entry Name="ItemName_BloodyDesc">Room 305 Key</Entry>
<Entry Name="ItemDesc_BloodyDesc">It's for unlocking Room 305.</Entry>
<Entry Name="ItemName_MonsterDesc">1st Floor Key</Entry>
<Entry Name="ItemDesc_MonsterDesc">It's for unlocking the 1st floor door.</Entry>
<Entry Name="ItemName_CrowDesc">Crowbar</Entry>
<Entry Name="ItemDesc_CrowDesc">This could be used to break open a door.</Entry>
</CATEGORY>

<CATEGORY Name="Messages">
<Entry Name="Entry1"></Entry>
</CATEGORY>

<CATEGORY Name="Credits">
<Entry Name="Ending">Thanks for playing![br][br] Hope it actually worked and you enjoyed it![br] You can skip by hitting escape or clicking
[br][br] Made by DJ Allen[br] Tools used: Amnesia level and material editors[br] Sounds used: Level editor and YouTube</Entry>
</CATEGORY>
</LANGUAGE>

The ones at the front always die first...
06-12-2016, 10:55 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#20
RE: Trigger Cave In

Assuming all other text works fine, I can only suggest adding this to your resources file:

<Directory Path="/custom_stories" AddSubDirs="true" />

Do it before the closing </Resources> tag.

(This post was last modified: 06-13-2016, 03:15 AM by Mudbill.)
06-13-2016, 03:14 AM
Find




Users browsing this thread: 1 Guest(s)