What's the best way to make a modular floating enemy? [SOLVED]

Not favoritedFavorited Favorited 0 favourites
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • You could change it to only add points to the array if the head is moving instead of every tick. Basically:

    Compare: distance(head.x,head.y,array.at(0,0), array.at(0,1)) > 0

    That would keep it from stacking on top of itself if it stopped. Possibly good enough.

  • You could change it to only add points to the array if the head is moving instead of every tick. Basically:

    Compare: distance(head.x,head.y,array.at(0,0), array.at(0,1)) > 0

    That would keep it from stacking on top of itself if it stopped. Possibly good enough.

    It still doesn't work. :(

    Whenever the enemy stands still in front of the player, the twelve objects accumulate in a single coordinate and I would actually like the objects to always maintain a distance between them in a straight horizontal line, forming a kind of "Chinese serpent".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That’s all I have at the moment.

    The array is a history of the positions of the head which basically can be thought of as a polyline. You can move along the polyline by a specific distance. A simple starting point would be to move a distance along a single line segments. Anyways, many path following examples do that.

    Another idea is to just move each section toward the section ahead of it till they overlap.

    Just some ideas. I won’t be making any examples any time soon.

  • That’s all I have at the moment.

    The array is a history of the positions of the head which basically can be thought of as a polyline. You can move along the polyline by a specific distance. A simple starting point would be to move a distance along a single line segments. Anyways, many path following examples do that.

    Another idea is to just move each section toward the section ahead of it till they overlap.

    Just some ideas. I won’t be making any examples any time soon.

    Ok, dude.

    Thanks one more time for your time and collaboration. :)

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