Jump to content
MIVIMEX

Animal roaming/wanderer script

Recommended Posts

Hello! I need a script for the animal, so that it move freely, wandered along one plane. (Did not fly!) With certain limits. Please, advise something! Thank you!

Share this post


Link to post
Share on other sites

That is a very large topic.  I suggest learning about pathfinding.  The basics of scripting pathfinding objects are not particularly difficult to understand, but I takes a lot of practice and experience to tune pathfinding critters and the landscape under them so that you have well-behaved roaming critters.  Poorly optimized pathfinding objects and poorly designed landscapes will result in creatures that get stuck, do not stay within proper boundaries,  and do not react well with avatars and other objects around them.

  • Thanks 1

Share this post


Link to post
Share on other sites

Another, cheaper method is to use raycasting or even just random positions within a radius and llSetPos in steps.

You'd have to make sure the surrounding area doesn't have walls or other obstacles that would make the behavior too obvious. 

  • Thanks 1

Share this post


Link to post
Share on other sites
9 hours ago, Wulfie Reanimator said:

Another, cheaper method

Is that cheaper than pathfinding?   I ask because I do not know, but generally I suspect that trying to do things by script rather than let the simulator do them is going to be the least efficient way of proceeding.   

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, Innula Zenovka said:

Is that cheaper than pathfinding?   I ask because I do not know, but generally I suspect that trying to do things by script rather than let the simulator do them is going to be the least efficient way of proceeding.   

I'm very confident that doing some basic float math and setting a non-physical object's position is cheaper than creating an physics-enabled character and using navmesh with llWanderWithin.

How much cheaper? No idea, and it depends on implementation.
The difference could be insignificant, especially with how few/many of them exist at once.
I don't know how that compares to raycasting either.

Share this post


Link to post
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.

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.


×
×
  • Create New...