Frictional Games Forum (read-only)
[SCRIPT] Dissapearing Wall - 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: [SCRIPT] Dissapearing Wall (/thread-13460.html)



Dissapearing Wall - Stepper321 - 02-20-2012

Hello! I am a medium/beginner in scripting for Amnesia, but i don't know how to make a dissapearing wall and an appearing wall, cause when you walk to an certain place you get a sanity damage of 5 and an earthquacke happens, but i want to remove a wall then. How do you do that Big Grin ?


RE: Dissapearing Wall - Unearthlybrutal - 02-20-2012

Make wall entity Smile


RE: Dissapearing Wall - GoranGaming - 02-20-2012

Well, first you need to name the wall, name it to "WallDissapear" Also make the are that the player collides with. Name it CollideWallDissapear

void OnStart()
{
AddEntityCollideCallback("Player", "CollideWallDissapear", "RemoveWallFunc", true, 1);

}

void RemoveWallFunc(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("WallDissapear", false)
GiveSanityDamage(5, true);
}


This will make the wall dissapear and remove sanity but I don't know how to make a earthquake.


RE: Dissapearing Wall - SilentStriker - 02-20-2012

(02-20-2012, 09:46 PM)GoranGaming Wrote: Well, first you need to name the wall, name it to "WallDissapear" Also make the are that the player collides with. Name it CollideWallDissapear

void OnStart()
{
AddEntityCollideCallback("Player", "CollideWallDissapear", "RemoveWallFunc", true, 1);

}

void RemoveWallFunc(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("WallDissapear", false)
GiveSanityDamage(5, true);
}

This will make the wall dissapear and remove sanity but I don't know how to make a earthquake.
This wont remove a wall. Because walls are static objects you first need to convert them to a staticProp(entity) and then create a body so the player wont walk through the wall. Then when you've done that you can remove the walls through scripting




RE: Dissapearing Wall - flamez3 - 02-21-2012

I don't know where they are but I found a model pack with all the walls that were entities. Shame I can't find them now.


RE: Dissapearing Wall - Your Computer - 02-21-2012

(02-20-2012, 09:49 PM)SilentStriker Wrote: This wont remove a wall. Because walls are static objects you first need to convert them to a staticProp(entity) and then create a body so the player wont walk through the wall. Then when you've done that you can remove the walls through scripting

Actually, they need to be converted to Object::Static entity type.