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
Triggering the Brute
CarnivorousJelly Offline
Posting Freak

Posts: 1,196
Threads: 41
Joined: Dec 2012
Reputation: 80
#1
Triggering the Brute

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!

[Image: quote_by_rueppells_fox-d9ciupp.png]
(This post was last modified: 01-04-2013, 07:33 AM by CarnivorousJelly.)
01-01-2013, 11:44 PM
Find Reply
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#2
RE: Triggering the Brute

Why can't I paste the code in properly? It takes away spaces and removes certain parts of the 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.
(This post was last modified: 01-02-2013, 03:49 AM by Rapture.)
01-02-2013, 03:43 AM
Find Reply
CarnivorousJelly Offline
Posting Freak

Posts: 1,196
Threads: 41
Joined: Dec 2012
Reputation: 80
#3
RE: Triggering the Brute

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.

[Image: quote_by_rueppells_fox-d9ciupp.png]
01-04-2013, 07:29 AM
Find Reply




Users browsing this thread: 1 Guest(s)