Frictional Games Forum (read-only)

Full Version: Dissapearing Wall
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 ?
Make wall entity Smile
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.
(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

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.
(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.