Help With a Monster - 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: Help With a Monster (/thread-9883.html) Pages:
1
2
|
RE: Help With a Monster - Marche100 - 08-20-2011 (08-20-2011, 11:31 PM)Elven Wrote: You sure you put pathnodes and ordered monster to follow them via scripting? Yes, I did. Upon further consideration and testing, it seems that as long as I stand outside the closet, even if I flatten myself against it, he comes at me every single time flawlessly. But then when I go into the closet it's like he doesn't know where I am half the time. Half the time he hits the thing to despawn him, the other half of the time he doesn't seem to come near the closet. I think I'm going to try the timer thing, but keep the despawn thing. That way, if the despawn fails I have the timer to back me up every single time. Can you give me a basic outline of how the timer thing would go? I'm going to try to find out for myself, but I'm not sure if I would be able to do this correctly with just the wiki's help on timers. RE: Help With a Monster - Your Computer - 08-20-2011 You could always dive into the Amnesia maps and see how they did it. Your map seems similar to the guest room (or Daniel's room) map of Amnesia. RE: Help With a Monster - Elven - 08-20-2011 AddTimer("(Use it if you want to do many actions in one timer, else empty)", TIME, "Timerfunctionname"); void Timerfunctionname(String &in asTimer) { //Do whatever you need to do here } RE: Help With a Monster - Marche100 - 08-20-2011 (08-20-2011, 11:43 PM)Elven Wrote: AddTimer("(Use it if you want to do many actions in one timer, else empty)", TIME, "Timerfunctionname"); Yeah I got that far with the wiki's help, but how would I specify how much time I want to pass before it goes off. That's the one thing I'm stuck on figuring out. Also, that tip about going into Amnesia's maps and seeing how they did it is a great idea. I'll take a look at that, quick. RE: Help With a Monster - Rownbear - 08-20-2011 void Monsterspawn(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_grunt_1", true); AddTimer("Timer", 20.0, "MonsterGone"); } void MonsterGone(string&in asTimer) { SetEntityActive("servant_grunt_1", false); } All of this OnStart, and this is the simplest way of doing it. by adding more sounds and maybe reactions from daniel will make it better EDIT: Make the monster harmless and then take the time for how long he uses to come inside the room and then leave. and there you go. also the 20.0 is the amount of seconds in the script. I just randomly put 20 seconds. RE: Help With a Monster - Marche100 - 08-20-2011 (08-20-2011, 11:46 PM)Rownbear Wrote: void Monsterspawn(string &in asParent, string &in asChild, int alState) Actually, I don't have the monster spawn just as the player enters the map, so I wouldn't put the part about the monster being active on OnStart, so I put it where I think it goes. I'll give it a try and post back once I see how it works. Also, I took a look at Daniel's Room and what they did with that. Boy, that was complicated. I don't think that's exactly what I was looking for, but thanks. I might be able to use looking into maps from the actual game later on to help. Edit: Alright, it didn't work the first time, but I stuck it in a different place and it works flawlessly every time. I want to thank all of you so much for your help. I've been stuck on this problem all day, and now I have a foolproof method for every monster in my game in terms of despawning it. So again, thanks a lot! I'll be sure to use everything you've all taught me while I make my custom story (and future custom stories). RE: Help With a Monster - Elven - 08-21-2011 glad to be in help ^^. I started scripting less then week ago, so I know how much being helped means . |