Object Avoid Fuction?

This forum is currently in read-only mode.
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Hello!

    I have used Construct for a couple of months now and I think its one of the best free game maker programs I've seen!

    But now I'm trying to make a tank game but I can't figure out how to make an 'avoid' function.

    What I mean is, I have enemy tanks that move towards you when you get close to them, but if there is a wall between the player and an enemy tank, the enemy tank will just drive into the wall. What I need is a avoid function for the enemy tanks so they can avoid the wall object and not always drive into them!

    I hope you understood that, and hope to find out how to do it!

    Thanks for reading and hope to hear some replies soon!

  • I take it your not using the rts plug?

  • I haven't really used the RTS plugin :O

    I just tried using the RTS plugin and put the path finding option to 'Solid' so it moves around 'solid' objects. So I make a wall object, changed it to a solid and place the wall in-between the enemy and the player, started the layout and it didn't avoid the wall! it just went straight through it :<

    Do ye' know how to fix that?

  • Start of layout

    Tanks add obstacle wall.

    Make sure your collisions are set to either per pixel, or bounding box for both.

    I'd get rid of the solid attribute, pathfinding for it can really slow things down.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok thanks!! I'll try it now!

    I just fixed it!! Thanks!

    I also had to change how the enemy moved, instead of rotating towards the player, I got it to move using the RTS fuctions.

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