Frictional Games Forum (read-only)
Game Problems - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Game Problems (/thread-19466.html)

Pages: 1 2 3 4 5 6


RE: Game Problems - The chaser - 12-07-2012

http://wiki.frictionalgames.com/hpl2/tutorials/script/events
http://wiki.frictionalgames.com/hpl2/tutorials/scripting/scaresbyjenniferorange


I think you will like these links ^^

The first link, the second script, is the exploding door.


RE: Game Problems - Fishnugget - 12-07-2012

Hmmm, thanks.....
But in not one links says what i have to write that the door explodes at an area
The Tutorial epxplains how to make the door explodes but not in wich time


RE: Game Problems - FlawlessHappiness - 12-07-2012

Click the search button and search for something like: Collide


RE: Game Problems - Fishnugget - 12-07-2012

Which custom story includes the justine monster?
I need it^^


RE: Game Problems - FlawlessHappiness - 12-07-2012

How about installing the free 1.2 patch?


RE: Game Problems - Fishnugget - 12-07-2012

Yes, sorry I already do it^^'

My problem is: A function with the same name and paramer already exist, but i cant find it.


void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "Boots" , true , 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "Schritte", true, 1);
AddUseItemCallback("", "BonusSchluessel", "BonusTuer", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player" , "ScriptArea_3" , "Slenderan" , true , 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "Slenderaus", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "Turweg", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_6", "Turweg2", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_7", "Turweg3", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_8", "Slenderan2", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_9", "Slenderaus1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_10", "Slenderaus2", true, 1);
SetEntityCallbackFunc("glass_container_mix_done_1", "OnPickup1");
AddUseItemCallback("", "key_tomb_rusty_1", "level_engine_1", "UsedKeyOnDoor", true);
}

void Boots(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("boots_idle_1", true);
AddEnemyPatrolNode("boots_idle_1", "PathNodeArea_1", 0, "Idle");
AddEnemyPatrolNode("boots_idle_1", "PathNodeArea_2", 0, "Idle");
AddEnemyPatrolNode("boots_idle_1", "PathNodeArea_3", 0, "Idle");
AddEnemyPatrolNode("boots_idle_1", "PathNodeArea_4", 0, "Idle");
}

void Schritte(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "schritt.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("BonusTuer", false, false);
PlaySoundAtEntity("", "unlock_BonusSchluessel.snt", "BonusTuer", 0, false);
RemoveItem("BonusSchluessel");
AddDebugMessage("KeyOnDoor", false);
}

void Slenderan(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "slen.snt", "Player", 0, false);
SetEntityActive("slenderman9_1", true);
AddEnemyPatrolNode("slenderman9_1", "PathNodeArea_5", 0, "Idle");
AddEnemyPatrolNode("slenderman9_1", "PathNodeArea_6", 0, "Idle");
}

void Slenderaus(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "reaant.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("slenderman9_1", false);
}

void Turweg(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "close_gate.snt", "Player", 0, false);
PlaySoundAtEntity("", "00_laugh.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("level_hub_2", true);
SetEntityActive("level_hub_1", false);
}

void Turweg2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "close_gate.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("level_hub_3", true);
SetEntityActive("level_hub_2", false);
}

void Turweg3(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "close_gate.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("level_hub_3", false);
}

void Slenderan2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "slen.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("slenderman9_2", true);
SetEntityActive("ScriptArea_10", true);
}

void Slenderaus1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "slen.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("slenderman9_2", false);
SetEntityActive("ScriptArea_10", false);
}

void Slenderaus2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "slen.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("slenderman9_2", false);
SetEntityActive("ScriptArea_9", false);
}

void OnPickup1(string &in asEntity, string &in type)
{
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
PlaySoundAtEntity("", "00_faint.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("enemy_suitor_1", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_engine_1", false);
PlaySoundAtEntity("", "unlock_key_tomb_rusty_1.snt", "level_engine_1", 0, false);
RemoveItem("key_tomb_rusty_1");
AddDebugMessage("KeyOnDoor", false);
}



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

}

Can you find it?


RE: Game Problems - The chaser - 12-07-2012

Slenderman, eh? Well, anyways: You have "UsedKeyOnDoor" 2 times. The script turns mad when there are two functions called the same, so change the name from the callback and the function.


RE: Game Problems - Fishnugget - 12-08-2012

I need help. I watch a Tut on youtube http://www.youtube.com/watch?v=ocu3DH95kiU
He explains, how to make a door explode at an are. I do the same and this error shows up

Err : no matching signatures to 'OnEnter()'
main (48, 2) Err : Unexpected end of file

I dont get it....again

Thats the script:


void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "Clown1" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_2" , "Clown2" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_3" , "Clown3" , true , 1);
AddEntityCollideCallback("Player" , "ScriptArea_1" , "CollideDoorExplode" , true , 1);
}

void Clown1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Clooni1_1", true);
AddEnemyPatrolNode("Clooni1_1", "PathNodeArea_1", 0, "Idle");
AddEnemyPatrolNode("Clooni1_1", "PathNodeArea_2", 0, "Idle");
AddEnemyPatrolNode("Clooni1_1", "PathNodeArea_3", 0, "Idle");
AddEnemyPatrolNode("Clooni1_1", "PathNodeArea_4", 0, "Idle");
AddEnemyPatrolNode("Clooni1_1", "PathNodeArea_5", 0, "Idle");
}

void Clown2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Clooni1_3", true);
AddEnemyPatrolNode("Clooni1_3", "PathNodeArea_6", 0, "Idle");
AddEnemyPatrolNode("Clooni1_3", "PathNodeArea_7", 0, "Idle");
AddEnemyPatrolNode("Clooni1_3", "PathNodeArea_8", 0, "Idle");
AddEnemyPatrolNode("Clooni1_3", "PathNodeArea_9", 0, "Idle");
AddEnemyPatrolNode("Clooni1_3", "PathNodeArea_10", 0, "Idle");
}

void Clown3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Clooni1_2", true);
AddEnemyPatrolNode("Clooni1_2", "PathNodeArea_11", 0, "Idle");
AddEnemyPatrolNode("Clooni1_2", "PathNodeArea_12", 0, "Idle");
}

void CollideDoorExplode(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("castle_1", false);
SetEntityActive("castle_broken_1", true);
CreateParticleSystemAtEntity("", "ps_break_wood.ps", "DoorExplodeParticle", false);
PlaySoundAtEntity("", "break_wood.snt", "DoorExplodeParticle", 0, false);

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

}


RE: Game Problems - FlawlessHappiness - 12-08-2012

Well you don't have anything in your script called void OnEnter(); which you probably should.
Also, when you put a { you have to end it with a }.

You didn't in CollideDoorExplode...


RE: Game Problems - Fishnugget - 12-08-2012

Where exactly have i to write onenter();?