Frictional Games Forum (read-only)
[HELP!!!!] Cave In - 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: [HELP!!!!] Cave In (/thread-18750.html)



[HELP!!!!] Cave In - TheMadmaxster - 10-12-2012

Hi all!
I am building the same custom story I have been working on for the past week or so and I am at a cave-in part. I want to do one there is just one problem...
I dont know how... I've searched ALL over google and haven't found one thing. I want it where when the player walks through an area and the unactivated cave-ins become, well, a little more activated. I really need some help. Thanks!
-TheMadmaxster


RE: [HELP!!!!] Cave In - Wapez - 10-12-2012

(10-12-2012, 09:36 PM)TheMadmaxster Wrote: Hi all!
I am building the same custom story I have been working on for the past week or so and I am at a cave-in part. I want to do one there is just one problem...
I dont know how... I've searched ALL over google and haven't found one thing. I want it where when the player walks through an area and the unactivated cave-ins become, well, a little more activated. I really need some help. Thanks!
-TheMadmaxster
Can you please specify what you think should happen?


RE: [HELP!!!!] Cave In - TheMadmaxster - 10-12-2012

(10-12-2012, 09:58 PM)Wapez Wrote:
(10-12-2012, 09:36 PM)TheMadmaxster Wrote: Exacally what I said: a player walks into an area and the inactivated cave-in entity turns active.



RE: [HELP!!!!] Cave In - FlawlessHappiness - 10-12-2012

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Function", true, 1);
}

void Function(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("cavein_1", true);
}


RE: [HELP!!!!] Cave In - TheMadmaxster - 10-12-2012

(10-12-2012, 10:59 PM)beecake Wrote: Thanks SOOOOO Much!!



RE: [HELP!!!!] Cave In - 4WalledKid - 10-12-2012

Use this and replace where needed:

void OnStart()
{
AddEntityCollideCallback(" Player" , "WRITE HERE THE NAME OF YOUR AREA", "SetActive", true, 1);
}

void SetActive(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("WRITE HERE THE NAME OF YOUR ENTITY", true)
}