Hi!! I’m new here and still very much a beginner T_T
So I would really appreciate some help. I’m making a game where you have to follow an NPC (the enemy), but they can look back at any moment. If they catch you moving when they look back, you lose and have to restart.
The concept is similar to Murder by Studio Seufz, but instead of using a knife to kill, you use a camera to take pictures. You can only take pictures when the NPC is busy doing an activity.
Does anyone know how I can make this work?
Well, you could give the enemy a RayCast and when the RayCast hits the player, it resets the level.
Thank you!! Are there any tutorials online about how i could do that?
there might be a tutorial somewhere…
i do have an example, though!
i haven’t tested this, so if it doesn’t work, blame me.
1 Like
Thank you for the example!! I tried copying it, but it doesn’t work… Do I need to adjust something for my main character (Player) to make it work?
From the enemy behavior
From the MC behavior

oh, yeah, inside the RayCast, there’s a setting which shows any object, set it to the player ( also i may have made the random too long, your character could be doing stuff for a while, which makes the game too easy, set it to 100 to 200 instead )
I have changed it, but still no change…
Thank you for your help though
wait, does the RayCast reach the player?
Yes i’ve changed the RayCast to reach the player, still doesn’t work sadly… The level doesn’t restart when the NPC looks back
I also want both the player and the NPC to walk at the same time. But when I try adding a behavior that allows it to walk, the NPC keeps moving endlessly in one direction, like when looking back at the player.
have you set the messages?
Huh wait sorry… how do you do that and what do i have to do with that? 
oh, the messages moving and you know.
here’s an example of all of it. it may or may not work.
( edit, the code in the bottom-left said ‘set both to self’ when it should have been ‘send both to self.’ )
1 Like
thanks!! you’ve been a great help to me :)))
If your npc is just moving endlessly, you can make is so that when it has a collision with the wall, it flips.
here is an example I make with a monster:
1 Like
I didn’t need the flip, but you can add it. And if your still having problems, give me your game, and I will see if I can spot the problem
1 Like
sure i’ll let you know!! i’m still in progress so there isn’t much to find now… but i appreciate it
You definitely need a RayCast, a MailBox and a Logic Gate (set AND), so when both behaviors (RayCast & MailBox) send signal to Logic Gate (note: both behavior should wired to different input, ex: RayCast (hit) to “a” and MailBox to “b”) then activate a code that could eliminate player.
1 Like