Frictional Games Forum (read-only)
Monster only in darkness??? - 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: Monster only in darkness??? (/thread-5436.html)

Pages: 1 2


RE: Monster only in darkness??? - Chilton - 11-15-2010

Again, i doubt thats possible without the creative use of invisible blocks and scripting If's


RE: Monster only in darkness??? - Everlone - 11-15-2010

Yes, but it is possible and i will try it.


RE: Monster only in darkness??? - Hooumeri - 11-15-2010

(11-15-2010, 12:06 PM)Kyle Wrote:
(11-15-2010, 10:53 AM)Hooumeri Wrote: I found these but I'm not sure what they do

bool GetLanternActive(); (same as setlanterndisabled???)
void SetLanternLitCallback(string &asCallback); (Callback for turnin the lantern on???)

Also how does the vars work? What can you do with them?

Don't include the bool and void in there. It should only be on the function or whatever...
Example:
void Function(string &in asParent, string &in asChild, int alState)
{
GetLanternActive();
if GetLanternActive() == true;
than [Whatever you want to happen]
}

This is how I think you do it... but I'm not sure. Smile

:p I have not even tried it, the reason why bool and void is there, is because I was sharing them here. Copy pasted them straight from the functions page, thats why.


RE: Monster only in darkness??? - Chilton - 11-15-2010

(11-15-2010, 01:46 PM)Everlone Wrote: Yes, but it is possible and i will try it.

But to my knowledge, the game engine does not measure light levels outside of its effect on the players sanity - An exclusion zone would be possible if you could make an invisible box follow the player without colliding with the player under a set of conditions though;
But even then, youd need to be using a lantern (Which might be the point?)

Is the light natural or artificial? (Window light etc, or lantern light?)
Also, in case it isnt clear, im actually trying to think of a way for this to work Smile


RE: Monster only in darkness??? - Everlone - 11-15-2010

If it will work, i need no lantern. but iam only on a another problem ^^ i try it first if i clear it.


RE: Monster only in darkness??? - anzki - 11-15-2010

Well there is entity or static object(can't recall which Big Grin) that is in 'technical' section, that is invisible, but blocks all movement, and if I recall correctly, there was a one that blocks only monster movement. Perhaps this helps you Big Grin

E: It is entity under technical section; there is two of them 'block_box' and 'block_nonchar'. And I think nonchar is what you are looking for.


RE: Monster only in darkness??? - Everlone - 11-15-2010

thanks Smile i try it.


RE: Monster only in darkness??? - HakePT - 11-16-2010

You can use the invisible blocks to block the enemy movement or just set despawn areas.

Trouble is, a fun mechanic would be for the player to have to light the environment to create a clear route to go with and while doable it will require an huge amount of scripting and debugging making almost impossible if your doing the lvl alone.


RE: Monster only in darkness??? - morgoe - 11-18-2010

Not sure on how to block enemies' movement, but to detect whether the player is in a lit environment:

Run a timer every second, getting the Player's sanity. Save it to an int variable called 'lastSanity' or something, and then if the current sanity > lastSanity, he's in a lit environment, else he's in darkness. Doesn't account for insanity events, but other than that it works really well.

I'm using a similar method in my map to disable sanity regeneration when you're moving.