Make Entities Appear? - 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: Make Entities Appear? (/thread-12110.html) |
Make Entities Appear? - Tripication - 12-27-2011 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... RE: Make Entities Appear? - Tanshaydar - 12-27-2011 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. RE: Make Entities Appear? - Tripication - 12-27-2011 (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.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. RE: Make Entities Appear? - Unearthlybrutal - 12-27-2011 There is "corpse_pile1_object"... you can deactivate and activate it with SetEntityActive, because of that it's not static RE: Make Entities Appear? - Tripication - 12-27-2011 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 RE: Make Entities Appear? - Tripication - 12-28-2011 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 RE: Make Entities Appear? - Tripication - 12-28-2011 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 |