moving away rts

For questions about using Classic.

Post » Fri Jul 30, 2010 7:28 pm

I am making a small ship game after i decided to postpone the other project, and anyway i want to do a fighter enemy ai, meaning first closing in on target and then when in range shoot and get away from target, some kind of a hit and run.

The first part is simple im usint rts behavior: move to object player, but how do i make him move away from that same object after he makes the shot.

Nevermind, i solved it, if anyone is interested i did this:

move to: player.x+((random(3)-1)*500) , player.y+((random(3)-1)*500)

It works suprisingly good.
Posts: 54
Reputation: 1,183

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest