Python Forum
Need help with NPC (bot) - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Game Development (https://python-forum.io/forum-11.html)
+--- Thread: Need help with NPC (bot) (/thread-27883.html)



Need help with NPC (bot) - Paul_Choi06 - Jun-25-2020

Hi, my name is Paul and I would like to make a simple game. In the game I wish to add a bot that could jump at random times on its own. It would be amazing if someone could help me out.


RE: Need help with NPC (bot) - GOTO10 - Jun-25-2020

Hello, Paul. You'll need to provide a little more information if you want help. Have you coded any part of the game already? You need to show what you've tried and clarify what you are trying to accomplish.


RE: Need help with NPC (bot) - michael1789 - Jun-25-2020

As GOTO10 said, without knowing what your game is, specific help is impossible.

With pygame, this is how I time random things in my games (mostly, enemies to shoot at random intervals).

random_chance_role = pg.random.randrange(1000)
if random_chance_role < 5:
          do_random_thing = True  # OR whatever your game requires
This will give you a .5% chance / frame. You can change the numbers to suit your needs.


RE: Need help with NPC (bot) - armila - Sep-04-2020

Short range are assaults that are the most limited separation of all extended assaults for NPCBot's group. For instance for paladins it is 10 yards (Judgment run) and for Mages it is 20 yards (Fire Impact extend) Long range assaults are the opposit of short range ones. For most classes this range is around 30-35 yards. This mode is valuable while assaulting something exceptionally hazardous to stand near Choosing "Precise" will open up a popup window that you can enter in a sum. This sum can be somewhere in the range of 0 to 50.