Frictional Games Forum (read-only)
Wall should get active - 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: Wall should get active (/thread-9539.html)



Wall should get active - mr.bonent - 08-01-2011

My Problem is that I want to get a wall active when the player enters an Scriptarea, but It doesn't work.

I used the wallentities from Mooserider.
Here the Script.

Quote:void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "BuchErscheinung", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "WandErscheinung", true, 1);
AddEntityCollideCallback("Player", "DoorClosedArea_1", "DoorClosedAndLook", true, 1);
AddUseItemCallback("", "DoorKey_1", "mansion_4", "UsedKeyOnDoor", true);

}
void BuchErscheinung(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("buch", true);
AddDebugMessage("buch", false);
}
void WandErscheinung(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("wand", true);
AddDebugMessage("wand", false);
}
void DoorClosedAndLook(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_6", true, true);
StartPlayerLookAt("mansion_6", 10.0f, 10.0f, "");
PlaySoundAtEntity("Schrei", "05_event_door_bang.snt", "mansion_6", 2.0f, false);
AddTimer("", 1.0f, "stoplook");
AddTimer("", 4, "stopsound");
}



RE: Wall should get active - xtron - 08-01-2011

You need to enter the modeleditor and edit the wall and change it so it's an object.


RE: Wall should get active - mr.bonent - 08-01-2011

It's already an entity, so I can set it passiv in the Editor.