Fighting NPCs

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

dantegamer79

Member
Apr 12, 2020
18
0
1
I'm trying to make a skript which spawns 3 npcs (bots) at the same location and start attacking and targeting in a random way each other and players completely random. I have a 1.8.8 server, Skript 2.6.4, Skellet 1.9.11 and skript-npc (which is shown in /pl list but not in /sk info which is weird), SkBee and a few others.
I currently have a working sk file which kinda does what I say but makes the server a lot laggy and I can't understand the reason
 
It depends how long the code is and what you are trying to do. If you are able to show me the code in some type of way, please do so I can help better.
 
It depends how long the code is and what you are trying to do. If you are able to show me the code in some type of way, please do so I can help better.
Hi Doodle, what's your Skript experience if I may ask? Also add me on discord if you want "therealyasuo"
 
Hi Doodle, what's your Skript experience if I may ask? Also add me on discord if you want "therealyasuo"
It's not all that. Only like 1 month, but I know a decent bit for my experience. I used to learn javascript (before giving up entirely), but a lot of my knowledge transferred to skript.
 
If you have PaperMC, you can use SkBee, skript-reflect, and possibly skript-mirror (I've never used it) to set pathfinding targets for entities. For moveable entities, this almost always means they'll start attacking.

You may need to cancel unrelated pathfinding attempts though, like zombies pathfinding to an unrelated villager instead of another zombie.
 
  • Like
Reactions: Doodle
If you have PaperMC, you can use SkBee, skript-reflect, and possibly skript-mirror (I've never used it) to set pathfinding targets for entities. For moveable entities, this almost always means they'll start attacking.

You may need to cancel unrelated pathfinding attempts though, like zombies pathfinding to an unrelated villager instead of another zombie.
:emoji_thumbsup: confirmed