Korvas Terindar 2 Posted November 21, 2015 Hi everyone, I have a favor to ask. I need to program a section of my fangame, I have a five nights at freddy's section, and want to have the animatronic's hunt the player, but have no idea how to program that. Can anyone help me out? Share this post Link to post Share on other sites
Thejaxinator 106 Posted November 21, 2015 Just set movement to follow player and have it turn on at player touch also setting the speed with the parkore like foxy fast and a running section with few blocks and that's just a idea Share this post Link to post Share on other sites
Rikifive 3,411 Posted November 21, 2015 I think he wants better AI than just following player + follow player works only when the event is visible on screen. It is idle while outside screen. Though I'm not sure what he's exactly trying to achieve - if he want to replicate the normal FNAF, then it will be quite complicated. I think that would be easier to script that, so even camera system would be possible ~ recreate many functions in general. =P Share this post Link to post Share on other sites
lonequeso 1,921 Posted November 21, 2015 You're in luck, Korvas! I happen to be making a level where the NPC's can chase the player as well. To do it, and make it work well, you need some scripts. I can't script to save my life, but I found two very handy ones that work really well. They each are fairly simple to use. The instructions and everything are on the scripts. The first is a Proximity Script. This script will allow you tell when the NPC event "sees" the player. The second is a Pathfinding Script, This can be used to make the NPC follow the player. There is a script call that's not shown that makes the NPC event follow the player: "walk_to($game_variables[x], $game_variables[y], 0)" x and y represent the player's coordinates. Make a variable for each and plug them in. Share this post Link to post Share on other sites