is there any good solution for flashlight and AI perception?

JOON 5 months ago in Game Creator updated by Marti (Lead Developer) 5 months ago 3

Hi, Marti

I am appreciate about your efforts and feekback for me :) GC is really cool tool to making nice 3d game. with such great system, I keep trying to make horror adventure with flashight in the ruined school at dark midnight.

actually I want to make "zombie" who can notifiy the light which came from flashlight on the player's hand. I added some logic to make "variable for minimum distance" to make them recognize player even they can't see player directly. it is not much details but it seems they can feel light and sounds from player. 

I make it like this (it is very simple formula)

MinDistance = isLight * LightValue + isWalk * WalkValue + isRun * RunValue + isStand * StandValue

with this formula, my AI can have another perception not only arc but also sphere like below image, and It works not bad at outside area.  but the problem is inside of building. for example, when player turned on flashlight at first floor, suddenly the zombies 2nd floor became insane and ran into the 1st floor. I tried to find other way to make it better for down-stairs and up-stairs.

I want to make AI can recognize "Change of illuminance" even if player turned on flashlight behind of AI's back. I think it is not easy challenge, is there any good solution with current GC structures? And I hope GC 2.0 can offer advenced perceptions, "illuminance" is one of my wishlist. :)

Unity version:
Game Creator version:

Illumination is always separate from game logic. The reason is beyond the scope of the answer, but would require accessing the GPU buffers and the depth buffer and do expensive calculations, that  you can get away by faking this effect quite cheaply.

I would simply use the Perception's cone vision of a character. However, if you want a character to notice the flashlight light, use a 3D model of the cone and add it a collider. You can make characters be aware of this light-cone.


what a beautiful idea! thanks a lot!!!