Jump to content

Scurrying rats


 Share

Recommended Posts

I have animated rats and other varmints.  Is there a AI script for pests, like Rats? If not, how would I make it scamper all over the navmesh?

It already has all the animations and I don't really them to attack or hurt the player - just be creepy.

Thank you.

Mike

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 980 GTX with 16gb vram / SSD drives

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1060 GTX with 8gb vram / SSD drives

Alienware Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1070 Ti with 16gb vram / SSD drives

My Patreon page: https://www.patreon.com/michaelfelkercomposer

My music for sale: https://www.tgcstore.net/category/513?format=all&perpage=30&textures=undefined&price=all&order=default&artists[]=87213

Custom synths and sounds - http://www.supersynths.com

Link to comment
Share on other sites

You have two practical options IMO:

Option 1

Use one character controllers per group of rats.

Option 2

Create you own pathfinding system just for rats. Obviously, this requires some setup, but depending on what you want to accomplish here, this might be an option.

 

With option 1, you would basically add a bunch of rats to a character controller. If you look at the AI script that comes with Leadwerks, you should see that it follows the player.

Instead, you will need to set up a bunch of points that will be "hiding" spots for the rats. When the player gets close enough to the rats ("GetDistance()"), then need to use "GoToPoint()" to go to one of those hiding spots. Which hiding spot you go to depends on how you want the AI to behave (is the closest point OK, or do the rats need to get as far as possible from the player?).

Link to comment
Share on other sites

I just want a bunch of rats scurrying around - very creepy.  I do have to figure out the animation frames, but in the end, I just want them upsetting the player but not hurting them.

Right now, the zombie ai script works but hurts the player and anything I attach that script to attacks once and then stops and just rotates around the player when you walk by an entity that already attacked you.  Very weird.

I was able to lower the amount of hurt to 1 and I assume a value of 0 will not hurt the player at all - but the rats (and spiders) just stop after - never to attack again.  I want them to stop for a moment or two and then come after you if you are close enough for them to 'see' you.

Mike

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 980 GTX with 16gb vram / SSD drives

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1060 GTX with 8gb vram / SSD drives

Alienware Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1070 Ti with 16gb vram / SSD drives

My Patreon page: https://www.patreon.com/michaelfelkercomposer

My music for sale: https://www.tgcstore.net/category/513?format=all&perpage=30&textures=undefined&price=all&order=default&artists[]=87213

Custom synths and sounds - http://www.supersynths.com

Link to comment
Share on other sites

You'll need to modify that script and have them not chase the player. There should be a "GoToPoint()" or "Follow()" command within that script. You need to change that to a hiding spot.

5 minutes ago, karmacomposer said:

I was able to lower the amount of hurt to 1 and I assume a value of 0 will not hurt the player at all - but the rats (and spiders) just stop after - never to attack again.  I want them to stop for a moment or two and then come after you if you are close enough for them to 'see' you.

I thought that you wanted them to move away from the player (according to your original post)?

Link to comment
Share on other sites

No, I want them to go TO the player and keep following them.

Mike

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 980 GTX with 16gb vram / SSD drives

MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1060 GTX with 8gb vram / SSD drives

Alienware Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1070 Ti with 16gb vram / SSD drives

My Patreon page: https://www.patreon.com/michaelfelkercomposer

My music for sale: https://www.tgcstore.net/category/513?format=all&perpage=30&textures=undefined&price=all&order=default&artists[]=87213

Custom synths and sounds - http://www.supersynths.com

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...