Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help With a Monster
Marche100 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Aug 2011
Reputation: 0
#11
RE: Help With a Monster

(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.
(This post was last modified: 08-20-2011, 11:39 PM by Marche100.)
08-20-2011, 11:37 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#12
RE: Help With a Monster

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.

Tutorials: From Noob to Pro
08-20-2011, 11:41 PM
Website Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#13
RE: Help With a Monster

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
}

The Interrogation
Chapter 1

My tutorials
08-20-2011, 11:43 PM
Find
Marche100 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Aug 2011
Reputation: 0
#14
RE: Help With a Monster

(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");

void Timerfunctionname(String &in asTimer)
{
//Do whatever you need to do here
}

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.
08-20-2011, 11:44 PM
Find
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
#15
RE: Help With a Monster

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 Smile

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.

(This post was last modified: 08-20-2011, 11:48 PM by Rownbear.)
08-20-2011, 11:46 PM
Find
Marche100 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Aug 2011
Reputation: 0
#16
RE: Help With a Monster

(08-20-2011, 11:46 PM)Rownbear Wrote: 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 Smile

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.

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).
(This post was last modified: 08-21-2011, 12:01 AM by Marche100.)
08-20-2011, 11:50 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#17
RE: Help With a Monster

glad to be in help ^^. I started scripting less then week ago, so I know how much being helped means Tongue.

The Interrogation
Chapter 1

My tutorials
08-21-2011, 01:07 AM
Find




Users browsing this thread: 1 Guest(s)