![]() |
Want Enemies to Open Doors - 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: Want Enemies to Open Doors (/thread-9139.html) Pages:
1
2
|
RE: Want Enemies to Open Doors - Dizturbed - 07-14-2011 here's an example using an entity and an area collide.. ![]() PHP Code: AddEntityCollideCallback("grunt_1", "ScriptArea_4", "grunt2active", true, 1); why dont you just make a function that when the entity collides with the area, the door opens? :p Correct me if im wrong ![]() RE: Want Enemies to Open Doors - nemesis567 - 07-14-2011 Is it me, or some post got deleted? EDIT: NVM RE: Want Enemies to Open Doors - convolution223 - 07-15-2011 (07-14-2011, 09:39 PM)Dizturbed Wrote: here's an example using an entity and an area collide.. That was the first thing I tried. For some reason I can't get AddEntityCollideCallback's to work for enemies. Maybe it's got something to do with having to do type something special in the level editor??? (I can do AddEntityCollideCallback's for the player perfectly, but for some reason I can't get enemies to trigger them... ![]() RE: Want Enemies to Open Doors - ferryadams11 - 07-15-2011 Hey I can help u ![]() void OnStart() { if(GetEntitiesCollide("grunt_1", "EnemyAtDoor") == true) && (GetSwingDoorLocked("door1") == false)) { SetSwingDoorDisableAutoClose("door1", true); //WITH THE NUMBERS I'M NOT QUITE GOOD SO EDIT SOME IF NEEDED// SetMoveObjectStateExt("door1", 1.0f, 1.0f, 1.2f, 0.2f, false); } } Hope it works now ![]() EDIT: Make sure you named all entities correctly to avoid problems RE: Want Enemies to Open Doors - convolution223 - 07-15-2011 (07-15-2011, 02:29 PM)ferryadams11 Wrote: Hey I can help u i've checked the entity names tons of times and there's nothing wrong there... i really thought your code would work what with the disabling autoclose and all.... I am very frustrated that I've spent hours trying to do this and he just keeps breaking the door. I tried countless variations of your code with number tweaks and got the door to start opening... while he's breaking it down that is. But now he just breaks it down, like my hopes and dreams. all crushed and scattered on the floor... Here's what i've got now: Code: void BrutePatrol(string &in asTimer) Code: AddEntityCollideCallback("brute1", "EnemyAtDoor", "CollideAreaTest03", false, 1); |