Call Monster When Interact With Door? - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Call Monster When Interact With Door? (/thread-6780.html) |
Call Monster When Interact With Door? - theDARKW0LF - 03-04-2011 Hi guys, quick question... What's the proper code to create an event where a monster is spawned after I interact with a door? I haven't created one of these specific situations before so I'm pretty much using trial and error methods right now... Right now my code looks like this: Code: void CollideAreaGruntDoorCallback(string &in asParent, string &in asChild, int alState) Something's wrong here, but I'm not too sure what, any help? RE: Call Monster When Interact With Door? - Russ Money - 03-04-2011 SetEntityActive("SpotGrunt2", true); SpotGrunt2 is the name of the grunt enemy entity? I don't know what the name of the monster is, so I can't tell you if that's coded correctly.\ Edit: Also, if you meant for the door to be intractable after a trigger, SetEntityPlayerInteractCallback("DoorGrunt", "SpawnGrunt", false); Then, it's right, if it's a door that's to spawn the monster whenever it gets touched, then just put it in OnStart. RE: Call Monster When Interact With Door? - theDARKW0LF - 03-04-2011 (03-04-2011, 08:31 AM)Russ Money Wrote: SetEntityActive("SpotGrunt2", true); Yes, SpotGrunt2 is the enemy. I'll try that out and get back to you, thanks! RE: Call Monster When Interact With Door? - theDARKW0LF - 03-05-2011 Yup, that worked. Appears that I had other things typed out incorrectly as well, but all has been remedied now! Appreciate the help! RE: Call Monster When Interact With Door? - Droopy - 03-06-2011 (03-05-2011, 01:31 AM)theDARKW0LF Wrote: Yup, that worked. Appears that I had other things typed out incorrectly as well, but all has been remedied now! You don't mind sharing the finished script for those who may have the same problems? RE: Call Monster When Interact With Door? - Russ Money - 03-06-2011 (03-06-2011, 05:51 PM)Droopy Wrote:(03-05-2011, 01:31 AM)theDARKW0LF Wrote: Yup, that worked. Appears that I had other things typed out incorrectly as well, but all has been remedied now! It'd look something like this Code: OnStart() RE: Call Monster When Interact With Door? - theDARKW0LF - 03-07-2011 (03-06-2011, 05:51 PM)Droopy Wrote: You don't mind sharing the finished script for those who may have the same problems? Sure. This is how mine goes: Code: void OnStart() |