mr.bonent
Junior Member
Posts: 47
Threads: 13
Joined: May 2011
Reputation:
0
|
Wall should get active
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");
}
|
|
08-01-2011, 07:26 PM |
|