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


Thread Rating:
  • 6 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script causing game to randomly crash (No FATAL ERROR)
RawkBandMan Offline
Posting Freak

Posts: 1,146
Threads: 35
Joined: Nov 2010
Reputation: 5
#1
Script causing game to randomly crash (No FATAL ERROR)

When I went to go to the 2nd map of my custom, it crashed immediatly, no FATAL ERROR code or anything, but the hpl.log gave me this

ERROR: Couldn't build script 'c:/program files/steam/steamapps/common/amnesia the dark descent/custom_stories/Escape Hell (DEMO)/maps/ch01/NorthCells.hps'!

Here is my script

Spoiler below!

void OnStart()
{
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
SetPlayerLampOil(100);
}
AddEntityCollideCallback("Player", "BruteWalkAway", "ActivateBrute", true, 1);
AddEntityCollideCallback("servant_brute_1", "Disappear", "FadeEnemy", true, 1);
}

void ActivateBrute(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
AddTimer("Freeze", 2.0f, "FreezePlayer");
SetLightVisible("torch_static01_6", false);
SetLightVisible("torch_static01_7", false);
SetLightVisible("torch_static01_8", false);
SetLightVisible("torch_static01_9", false);
SetLightVisible("torch_static01_10", false);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0.5f, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0.5f, "");

}

void FreezePlayer(string &in asTimer)
{
SetPlayerActive(false);
StartPlayerLookAt("servant_brute_1", "", "", "");
AddTimer("Look", 5.0f, "LookAt");
}

void LookAt(string &in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);
}

void FadeEnemy(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("servant_brute_1", false);
}




I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
(This post was last modified: 08-25-2011, 10:15 PM by RawkBandMan.)
05-08-2011, 05:18 PM
Find
Greven Offline
Member

Posts: 106
Threads: 13
Joined: May 2011
Reputation: 3
#2
RE: Where can I find water?

http://www.youtube.com/watch?v=v4WudNebX...ata_player Smile

[WIP] Recidivus
05-08-2011, 05:19 PM
Find
RawkBandMan Offline
Posting Freak

Posts: 1,146
Threads: 35
Joined: Nov 2010
Reputation: 5
#3
RE: Where can I find water?

(05-08-2011, 05:19 PM)Greven Wrote: http://www.youtube.com/watch?v=v4WudNebX...ata_player Smile

Thank you!

Now I need to make credits for my level. Any help on how?

I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
(This post was last modified: 05-08-2011, 05:46 PM by RawkBandMan.)
05-08-2011, 05:44 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#4
RE: Where can I find water?

Credits are made in the extra_english.lang file.

I do not have any example here, but I will try to write from my memory.

in extra_english.lang:

<CATEGORY Name ="Ending">
<Entry Name ="StartCredits">
Title of Story[br]
Made By:[br]
blablabla[br]
</Entry>
</CATEGORY>

and to call it, use this in your functions, preferably void OnLeave()

void OnLeave()
{
StartCredits("musicfiletoplay", true, "Ending", "StartCredits", 0);
}

That should do the trick, tell me if you have any troubles Smile
05-08-2011, 08:31 PM
Find
Simpanra Offline
Senior Member

Posts: 314
Threads: 28
Joined: Mar 2011
Reputation: 0
#5
RE: Where can I find water?

(05-08-2011, 05:19 PM)Greven Wrote: http://www.youtube.com/watch?v=v4WudNebX...ata_player Smile

yay =D thanks for referencing my vid ^___^
05-08-2011, 08:33 PM
Find
RawkBandMan Offline
Posting Freak

Posts: 1,146
Threads: 35
Joined: Nov 2010
Reputation: 5
#6
RE: Where can I find water?

Thanks guys! I just have 2 more things. 1.For the credits, to I put the void OnLeave() in my mapname.hps? and 2. I tried to make a key unlock the door, and it worked. But, the name for it is not showing up. It just says "Picked Up" No name or anything, then in the inventory, there is no name of the key, or a description.

heres my .hps and my extra_english.cfg

extra_english.cfg
Spoiler below!
<LANGUAGE>

<CATEGORY Name="Test">
<Entry Name="Description>
Mr Testy! </Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_AwesomeKey">Awesome Key</Entry>
<Entry Name="ItemDesc_AwesomeKey">Key for a door that's just so important</Entry>
</CATEGORY>
</LANGUAGE>


.hps
Spoiler below!
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "awesomekey_1", "castle_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)

{
SetSwingDoorLocked("castle_1", false, true) ;
PlaySoundAtEntity("", "unlock_door", "castle_1", 0, false);
RemoveItem("awesomekey_1");
}

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

}

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

}


I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
05-08-2011, 09:18 PM
Find
Greven Offline
Member

Posts: 106
Threads: 13
Joined: May 2011
Reputation: 3
#7
RE: Where can I find water?

(05-08-2011, 08:33 PM)Simpanra Wrote:
(05-08-2011, 05:19 PM)Greven Wrote: http://www.youtube.com/watch?v=v4WudNebX...ata_player Smile

yay =D thanks for referencing my vid ^___^

np mate, your videos are great and you really help people like the one above Smile

//foodar100 :3

[WIP] Recidivus
(This post was last modified: 05-08-2011, 09:33 PM by Greven.)
05-08-2011, 09:22 PM
Find
Simpanra Offline
Senior Member

Posts: 314
Threads: 28
Joined: Mar 2011
Reputation: 0
#8
RE: Where can I find water?

(05-08-2011, 09:22 PM)Greven Wrote: np mate, your videos are great and you really help people like the one above Smile

//foodar100 :3

=D thanks ^_^

P.S, what does "//foodar100" mean? =P
05-08-2011, 09:28 PM
Find
Greven Offline
Member

Posts: 106
Threads: 13
Joined: May 2011
Reputation: 3
#9
RE: Where can I find water?

(05-08-2011, 09:28 PM)Simpanra Wrote:
(05-08-2011, 09:22 PM)Greven Wrote: np mate, your videos are great and you really help people like the one above Smile

//foodar100 :3

=D thanks ^_^

P.S, what does "//foodar100" mean? =P

It means im the foodar100 who commented on your youtube channel Big Grin


Answer to the key question:

You need to select your key in your level editor and go into the entity tab where you will find the CustomSubItemTypeName where you write the name of the key (from youre extraenglish.cfg file)

[WIP] Recidivus
(This post was last modified: 05-08-2011, 09:39 PM by Greven.)
05-08-2011, 09:32 PM
Find
Simpanra Offline
Senior Member

Posts: 314
Threads: 28
Joined: Mar 2011
Reputation: 0
#10
RE: Where can I find water?

=D no way! hows it going man? =)

Silly youtube blocking your posts cos of spam x3
05-08-2011, 09:33 PM
Find




Users browsing this thread: 2 Guest(s)