Trying to use CreateEntityAtArea - 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: Trying to use CreateEntityAtArea (/thread-14673.html) Pages:
1
2
|
RE: Trying to use CreateEntityAtArea - Apjjm - 04-13-2012 You can't remove entities, but you can de-activate them, or set their health to 0 and let them break (if they are breakable). If you want removable meshes you can use Add/RemoveAttachedPropToProp, but keep in mind the z parameter of that function is bugged (z rotation is used for both position and rotation and Z pos is ignored - you can work around this though) and no collision detection or physics is used for the attached bodies. Note that if you are just wanting to remove and create one object - E.g. resetting it. You can try using "ResetProp" - this should teleport the prop back to it's starting position. It is usually sufficient if you want to create some form of dispenser to have a few entities and just juggle them with reset prop - this also lets you hard limit the number of entities pretty trivially. RE: Trying to use CreateEntityAtArea - FragdaddyXXL - 04-13-2012 (04-13-2012, 12:18 AM)Apjjm Wrote: You can't remove entities, but you can de-activate them, or set their health to 0 and let them break (if they are breakable).ResetProp works great! RE: Trying to use CreateEntityAtArea - thetastyfish - 02-28-2013 Hi, I'm having the same issue as FragdaddyXXL. I'm trying to set it up so that when the player collides with "ScriptArea_7", an eagle statue spawns at "eagle_appear", but when I test it out, nothing happens. void OnStart() { AddEntityCollideCallback("Player", "ScriptArea_7", "FUNCTION7", true, 1); } void FUNCTION7(string &in asParent, string &in asChild, int alState) { if(alState == 1) { CreateEntityAtArea("eagle_1", "eagle.ent", "eagle_appear", false); } SetLightVisible("PointLight_2", true); SetLightVisible("PointLight_1", true); } I know that this is probably poorly written, but I've only been working with this for about a month, so I appreciate your patience. Again, I'm just trying to make an eagle statue appear at "eagle_appear", and it just isn't happening. RE: Trying to use CreateEntityAtArea - Adrianis - 02-28-2013 Did you read through all the posts in this thread? You need to make sure your statue is an entity type of some sort, not a staticprop type as those cannot be created |