I Can't Describe It In One Word

So… I have more 3 Problems that I need help with, @PixelPizza :

  1. Fist off, I have tried numerous times to try and have the NPC’s move at random, i.e. for random amounts of time, random distances, and at random intervals (That’s probably not the right word for it but when I say “intervals” I mean the NPC’s are not Constantly moving, but instead moving sometimes and sometimes staying still). I do not want moving constantly and just flipping directions when a collision happens like everything I have read says to, so please don’t give me that as the answer.

  2. Secondly, I want what I just said above to not happen when the player is within a certain proximity (that is not the problem) and instead the NPC’s run the opposite direction of the Player (that’s the problem).

  3. Finally, I have no clue how to have an object solid on the top but not the bottom, meaning the player can jump through it, but not fall through it.

P.S. Examples are always preferred, whether that be a link to a project or an image of the code.

1 Like

@grazer Can you help this guy plz! @GGSTUDIOS

  1. I have this old example of Top-Down NPCs - they move at random intervals:
    Flowlab Game Creator - NPCs

You can adapt the logic to Platformer if you want to.

  1. To make the NPC run in the opposite direction of the player, you can invert the logic from a Follow logic. Instead of making the NPC look at the player, make it look in the opposite direction (Flip behavior) and use the “forward” input from the Velocity behavior.

  2. You can use raycast to detect that and use the Enable behavior to disable the physics from an object.

I hope this helps :slight_smile:


So, idk how to use the raycast.