Frictional Games Forum (read-only)
Simple scripting - 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: Simple scripting (/thread-10031.html)



Simple scripting - Funman - 08-28-2011

Hey, I've been trying all sorts of scripting and NOTHING WORKS. So, as a starting point, can someone give me what the entire scrip file would look like for having a door shatter when the player grabs it? Thanks.


RE: Simple scripting - Russ Money - 08-28-2011

(08-28-2011, 11:01 PM)Funman Wrote: Hey, I've been trying all sorts of scripting and NOTHING WORKS. So, as a starting point, can someone give me what the entire scrip file would look like for having a door shatter when the player grabs it? Thanks.

This may help out

http://www.frictionalgames.com/forum/thread-8851-post-78624.html#pid78624


RE: Simple scripting - Elven - 08-28-2011

and if you scroll little bit down in titles, that will also help you:

http://www.frictionalgames.com/forum/thread-10017.html


RE: Simple scripting - Funman - 08-30-2011

Ok, so this is my code for doing what I mentioned before, but it doesn't work. Could someone see if there's a mistake?





void OnStart()

{
SetEntityPlayerInteractCallback("mansion_1", "Break_Door", true);
}

void Break_Door(string &in entity)

{
SetPropHealth("mansion_1", 0);
}


void OnEnter()
{

}

void OnLeave()
{

}

Is something required in the entity tab?