Frictional Games Forum (read-only)
Triggering the Brute - 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: Triggering the Brute (/thread-19767.html)



Triggering the Brute - CarnivorousJelly - 01-01-2013

I've been working on this for quite a while - the room has taken me a couple weeks to prepare visually (probably because I'm a nooblette) and I've been procrastinating on the scripting.

I took a look at the scripts for Amnesia where they triggered the grunt in the Archives (jump-scare after cave-in) and got this far with the script:
---------------------------------------------------------------------
void OnStart (string &in asParent, string &in asChild, int alState)
{
SetEntityActive ("monster_trigger", true);
}
void OnStart ()
{
AddEnemyPatrolNode("brute", "PathNodeArea_2", 0.0f, "");
AddEntityCollideCallback ("Player", "monster_trigger"
----------------------------------------------------------------------
I'm not sure if any of that is correct.

This is the area I'm working with:
[Image: amnesia__1__by_rueppells_fox-d5q2l76.jpg]
There's a door leading from an entrance-hall to this room, but it wouldn't give the player enough time to hide if I triggered the monster upon having the player break the wall. Instead, I placed a script area (named monster_trigger) inside the secret room to force the player to hide in there until the monster (named brute) disappears.

So I guess my main question is: how do I trigger an entity to activate upon player collision with a script area?

If you have the time, I would also like to know how to make him disappear when he reaches the end of the pathnodes.

Thanks for being patient with me!


RE: Triggering the Brute - Rapture - 01-02-2013

Why can't I paste the code in properly? It takes away spaces and removes certain parts of the code.

Code:
void OnStart()
{
AddEntityCollideCallback("Player", "Area_Brute_0", "Script_Brute_0", true, 1);
AddEntityCollideCallback("Entity_Brute_0", "Area_BruteDisappear_0", "Script_BruteDisappear_0", true, 1);
}

void Intro()
{

}

void OnEnter()
{

}

//******************************************************************************************************
//******************************************************************************************************
//******************************************************************************************************

void Script_Brute_0(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Entity_Brute_0", true);

AddEnemyPatrolNode("Entity_Brute_0", "PathNodeArea_0", 0.0f, "");
AddEnemyPatrolNode("Entity_Brute_0", "PathNodeArea_1", 0.0f, "");
AddEnemyPatrolNode("Entity_Brute_0", "PathNodeArea_2", 0.0f, "");
AddEnemyPatrolNode("Entity_Brute_0", "PathNodeArea_3", 0.0f, "");
AddEnemyPatrolNode("Entity_Brute_0", "PathNodeArea_4", 0.0f, "");
}

void Script_BruteDisappear_0(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Entity_Brute_0", false);
}

Use "AddEntityCollideCallback" if you want to check for entity collision.

In the void OnStart() { } we will put in any AddEntityCollideCallback's. The first one, when the player walks into the Area, the second one is for the Brute, when he walks into his Area.

//**************
Oh and for your room, since you have such bright billboards. Throw in two more PointLights. The first one should be large (Approximately 9-11 Radius, but change it if needed.) with a really dimmed orange/yellow color. About 15-25% of the power light level of the billboards is good. While the second one is half the Radius size with about 40-50% light level.
Both PointLights should be placed close to where the billboards are.

Light bounces off the wall and should leak around the room. Yours has a really bright spot and the rest of the room is rather dark.


RE: Triggering the Brute - CarnivorousJelly - 01-04-2013

I got it! Thank you so much Big Grin Scared myself testing the map, but it'll be worth it.

I also got rid of a few billboards and added a few point lights as suggested, it looks much prettier now.