Frictional Games Forum (read-only)

Full Version: Make Entities Appear?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hiya, I was wondering if it's at all possible to make multiple body piles appear on a trigger like a pickup event.

E.g. Walk downstairs and pick up a key, then walk back upstairs and see a bunch of bodies lying in a pile in the middle of a hallway. I can get it to work with the lamp but when I deactivate the Body piles, they're still active when i run a test just to make sure they're not there...
SetEntityActive true and false will help you, but that works only on non-static entities. I mean, if an entity is a StaticProp then you can't use those functions, you need to create a custom entity for that.
Also, CreateEntityAtArea function might come in handy.
(12-27-2011, 11:54 AM)Tanshaydar Wrote: [ -> ]SetEntityActive true and false will help you, but that works only on non-static entities. I mean, if an entity is a StaticProp then you can't use those functions, you need to create a custom entity for that.
Also, CreateEntityAtArea function might come in handy.
Ok, is there any way to make a custom entity short of having to model it, sorry im kinda new to this so im just trying to figure some stuff out on a quick map before i start to build it seriously and fix up the fine details.
There is "corpse_pile1_object"... you can deactivate and activate it with SetEntityActive, because of that it's not static Smile
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
If i could have someone walk me through how to do this through steam i would be highly appreciative, it would be better than me not really learning how to do it and having someone else do it for me i guess. But it's up to whoever.

Steam = Tripication #TH
ID = STEAM_0:1:34797132
Nevermind, ive taken a different and better approach to my cheap scare and i will figure the oil out by looking at the original game .hps file. Thanks for the help