RE: Make Entities Appear?
Ok, this is becoming a mess now. I've just tried my original problem and it hasnt worked out well...
Im going to start from scratch kinda.
Hello, i was wondering why when i make these objects (Bodies and LightBodies) active on collision with this area(BodiesArea), it doesnt work.
Here is my code.
____________________________________________________________________
void OnStart()
{
AddEntityCollideCallback("Player", "BodiesArea", "BodiesAppear", true, 1);
}
void BodiesAppear(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Bodies", true);
SetEntityActive("LightBodies", true);
}
____________________________________________________________________
Im not sure weather it is a stupid mistake or just something that doesnt work together but there it is.
NOTE: The bodies are INACTIVE but when i collide with the area, they STAY INACTIVE and dont become ACTIVE.
Also, i was wondering if i could get the following code updated so that when you start the map, it is on 0% oil.
____________________________________________________________________
void OnStart()
{
AddEntityCollideCallback("Player", "DoorSlam", "CollideDoorSlam", true, 1);
AddEntityCollideCallback("Player", "DoorBang", "CollideDoorSound", true, 1);
}
void CollideDoorSlam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("Door001", true, true);
StartPlayerLookAt("Door001", 20.0f, 20.0f, "");
AddTimer("", 1.0f, "StopLook");
}
void StopLook(string &in asTimer)
{
StopPlayerLookAt();
}
void CollideDoorSound(string &in asParent, string &in asChild, int alState)
{
PlayMusic("19_event_brute.ogg", false, 0.8, 2, 0, true);
if(GetPlayerSanity() < 30) return;
GiveSanityDamage(30, true);
}
____________________________________________________________________
Much Appreciated
(This post was last modified: 12-27-2011, 01:37 PM by Tripication.)
|