3
« on: March 14, 2018, 08:04:13 pm »
Hey! Recently, I've been working on a FNaF style fan-game starring Grover as the main enemy. I need to have him move around the map randomly, but only moving a certain number of room at a time. Unfortunately, he randomly moves more than the intended amount. I've had this problem and tried to rearrange the code and order for several months now, but I just decided now to ask about it, mainly because I thought I wouldn't be able to show enough info. I'll try my best:
I've made the game so he moves every 11 seconds, and the room that Grover is in limits him to the next room he can move to. This make the game completely randomized.
The Grover AI: 1-8 are different rooms, with 10 being the jump-scare. The on created block is filled with 8 of these (each 11 seconds) , but with different numbers. The jump-scare is only supposed to trigger when Grover is in room 7 or 8 and the door is open (equals to zero) and 11 seconds have gone by. For some reason, I think that the game runs the jumpscare code too early (when Grover is not in rooms seven or eight), and the game shows the jump-scare.
I don't know if there is a better way to re-arrange the code.
Also if you have any suggestions or alternatives I'd love to hear them! I'm no expert;)
Thanks so much!