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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with Enemies
Randomguy9900 Offline
Junior Member

Posts: 41
Threads: 3
Joined: Dec 2011
Reputation: 1
#1
Help with Enemies

So I have two problems, one of which I really have no idea how to fix.
In the main story of Amnesia, you hide when the monster is looking for you, and he eventually goes away. How do you get him to go away after he loses you after he finds you?
Also, is there a way to make him spawn when a certain thing happens, but make no noise?

Thank you.
12-30-2011, 06:55 AM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: Help with Enemies

To have a monster de-spawn, you can do a few things.

1) You could set a path for the monster to follow and put a script area in the path. Then run a script so that when the MONSTER collides with the SCRIPT AREA, it runs "SetEntityActive("MONSTERNAME", false);".... This will set him inactive, or in other words, remove him from the game.

2) Have him roam or follow a path like normal and run a timer for him to de-spawn, such as, when activated, in the same function he is activated, you can put in: AddTimer("despawnmonster", TIME *FLOAT*, "CALLBACKFUNCTION");
and in the callback function, SetEntityActive("MONSTERNAME", false); .... This does the same as above, but both have different requirements. Your choice, TIMED de-spawn? Or when he reaches an area, he despawns...


As for not making any noise, you would have to open him in the ModelEditor, go to Edit > User Defined Variables and scroll down to where it says "EnabledSound" and make it empty. Then save it in your "entities" folder (AS A NEW ENTITY, DO NOT OVERWRITE), AS WELL AS your Custom Story folder. The "EnabledSound" is the noise the monster makes upon being spawned. without it, he makes no noises upon activation... ALSO, If you need it, the "ActivationDistance" in the User Defined Variables tells the game how far the player must be before it de-spawns. if you are within the distance, the monster does not go away, however, when you are at a greater distance, the monster will de-spawn automatically. Tweak it if needed.

It's 1:30AM here and I was going to leave, but I figured I'd help one last time. XD Hope this helps!
(This post was last modified: 12-30-2011, 07:34 AM by Statyk.)
12-30-2011, 07:31 AM
Find




Users browsing this thread: 1 Guest(s)