0 votes

please provide me with a simple code written in gdscript , as I am a newbie. I have also watched many videos about steering but thats not what I need i want the NPC to wander around and repel from player.I am from India please help me.

in Engine by (22 points)
reshown by

1 Answer

0 votes

I would make either an animation with the animation player that moves the translation or the offset of the NPC.
Or with a script you could have the NPC choose a random direction and move to that direction every few seconds. There are many ways to do this, but it depends on what exactly you desire.

by (56 points)

hello ,thank you for your suggestion I want NPC (which is basically the animals) in game to move in the four directions randomly ,could you be please provide me with code in gdscript language for this.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.