Frictional Games Forum (read-only)

Full Version: Monster only in darkness???
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is it possible that monster are only in darkness?and donĀ“t walk into light?
I think its possible but no idea how to make it.

Thanks for all help Smile
Thats actually quite a tricky one - I dont think light is measured that way, but what you could do is make some kind of script to spawn an enemy if you leave a lit area, and/or if you turn your lantern off, and unspawn it if you either re-enter a lit area or turn your lantern on...?

Dear me, that would be a hard script... Maybe?
Hmm
*Starts pondering pseudo-code*
and with an area? is it possible to make a area where the monster want to go?
this could be combine with the light effect and then it should be work.or not?
I doubt you could make an AI blocking area, it doesnt make much sense.
It is however possible to make an area as i said, were a monster spawns if you leave it, and disappears if you enter it...
Thats the best i can come up with
mmh, then i must try another ^^
Actually I was trying to make a script that makes a round of enemies around you if you have your lantern turned on. Couldnt figure out how it would work, so this thread is highly in my interests :p
that is only a great idea ^^ but how to work it? ^^
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?
(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
the problem is that the monster walk everywhere. but i will the monster walk only in darkness and not in light. but maybe its impossible.
i will try it later with some actions and if not work i try another way.
Pages: 1 2