Herd bahabiour

0 favourites
  • 5 posts
  • Hi, this is my first post

    I need to simulate a group of cows being herded by the player. When the player moves close to the cows, all the cow objects move away from the player. Not spreading in every direction, but the cows should follow a leader. The leader is the cows temporarily furthest away from the player. Therefore the leader changes all the time. I know how to identify the leader, but how do I make an object move towards another object of the same type (i.e. the leader) ?

    Any suggestion will be much appreciated. Thanks in advance.

    AJ

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Perhaps tag the furthest away for the duration of the run ?

    like, .. pick leader whos furthest away, and pick its UID.

    set alll other sheep angles towards sheep with UID.

  • Try this behavior

    construct.net/en

    I used it for one of my games. It works pretty well.

  • Try this behavior

    http://www.scirra.com/forum/behaviour-boids-flocking_topic61864.html

    I used it for one of my games. It works pretty well.

    Thanks for posting :D

  • Perhaps tag the furthest away for the duration of the run ?

    like, .. pick leader whos furthest away, and pick its UID.

    set alll other sheep angles towards sheep with UID.

    Thanx

    How do I "pick its UID"?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)