Frictional Games Forum (read-only)

Full Version: Wall should get active
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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");
}
You need to enter the modeleditor and edit the wall and change it so it's an object.
It's already an entity, so I can set it passiv in the Editor.