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


Game Problems - Fishnugget - 12-06-2012

So, im sure I will have many problems with my custom Story during the editing. So I open a Thread for this problems^^'
So my Problem in this moment is weird....
I want to make a Jump Scare. A grunt Body have to teleporting front of the player. This works perfectly. But it doesnt dissapear. I write in another Area the same but I change from True to False. It doesn't Work...
Why?


This is the using Script:



AddEntityCollideCallback("Player", "ScriptArea_2", "TOTSCHRECK", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "AndereArea2", true, 1);
}

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

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

Whats wrong?


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

Wouldn't it be more logical making a timer for this? Anyways, I don't see anything wrong. Delete map_cache's, check the names, etc.

A timer would be:

AddEntityCollideCallback("Player", "ScriptArea_2", "TOTSCHRECK", true, 1);

}



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

{

PlaySoundAtEntity("", "bam.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);

SetEntityActive("grunt_body_part2_2", true);
AddTimer("", secondstodoit, "AndereArea2");

}



void AndereArea2(string &in asTimer)

{

PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);

SetEntityActive("grunt_body_part2_2", false);

}


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

Now comes this:
http://i46.servimg.com/u/f46/17/76/85/90/2012_112.jpg


RE: Game Problems - xxxxxxxxxxxxxxxx - 12-06-2012

Even though I'm a complete and utter scripting-noob, that made me chuckle Big Grin

(Try writing the amount of seconds there, not the word "secondstodoit"...)


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

(12-06-2012, 05:32 PM)Fishnugget Wrote: Now comes this:
http://i46.servimg.com/u/f46/17/76/85/90/2012_112.jpg
Ehem... it was a text for you to understand what to put... you must put a number (the seconds to do it).
Like:

AddTimer("", 1, "AndereArea2");

You just copy-pasted the script, right?


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

I want that a door explodes, when I arrive in an area. How can I make that?


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

When you collide with the area use the line:
SetPropHealth("INSERTDOORNAMEHERE", 0);


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

Thats the whole Script?
Don't I have to write wich area?


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

Of course you do! But if you don't know how to write it, then i recommend you to check out basic scripting first Wink I can reveal that you have to use AddEntityCollideCallback. Makes sense since you collide with an area Smile
Then use the line i provided


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

Does an Tutorial exist? Sorry i dont get it^^'