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


Thread Rating:
  • 3 Vote(s) - 1.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Monster only in darkness???
Everlone Offline
Member

Posts: 178
Threads: 11
Joined: Oct 2010
Reputation: 2
#1
Monster only in darkness???

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

[Image: 555233.jpg]
11-14-2010, 12:55 PM
Find
Chilton Offline
Member

Posts: 138
Threads: 9
Joined: Sep 2010
Reputation: 0
#2
RE: Monster only in darkness???

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*
11-14-2010, 01:20 PM
Find
Everlone Offline
Member

Posts: 178
Threads: 11
Joined: Oct 2010
Reputation: 2
#3
RE: Monster only in darkness???

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?

[Image: 555233.jpg]
11-14-2010, 01:31 PM
Find
Chilton Offline
Member

Posts: 138
Threads: 9
Joined: Sep 2010
Reputation: 0
#4
RE: Monster only in darkness???

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
11-14-2010, 01:40 PM
Find
Everlone Offline
Member

Posts: 178
Threads: 11
Joined: Oct 2010
Reputation: 2
#5
RE: Monster only in darkness???

mmh, then i must try another ^^

[Image: 555233.jpg]
11-14-2010, 01:53 PM
Find
Hooumeri Offline
Member

Posts: 57
Threads: 11
Joined: Oct 2010
Reputation: 0
#6
RE: Monster only in darkness???

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
11-14-2010, 02:05 PM
Find
Everlone Offline
Member

Posts: 178
Threads: 11
Joined: Oct 2010
Reputation: 2
#7
RE: Monster only in darkness???

that is only a great idea ^^ but how to work it? ^^

[Image: 555233.jpg]
11-14-2010, 02:19 PM
Find
Hooumeri Offline
Member

Posts: 57
Threads: 11
Joined: Oct 2010
Reputation: 0
#8
RE: Monster only in darkness???

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
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#9
RE: Monster only in darkness???

(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

(This post was last modified: 11-15-2010, 12:10 PM by Kyle.)
11-15-2010, 12:06 PM
Find
Everlone Offline
Member

Posts: 178
Threads: 11
Joined: Oct 2010
Reputation: 2
#10
RE: Monster only in darkness???

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.

[Image: 555233.jpg]
11-15-2010, 12:13 PM
Find




Users browsing this thread: 1 Guest(s)