Lock On Missiles

For questions about using Classic.

Post » Tue Feb 02, 2010 5:13 am

I'm making a top-down space shooter and want to add in lock on missiles that the player can fire from his ship. I already have a battle cruiser enemy that spawns fighters which follow and shoot at the player, but I can't figure out how to make a missile lock on system so that I can lock on to an enemy, fire a missile, then have the missile track that specific enemy even if there are others of the same kind on the screen. Anyone know how?
B
2
S
2
G
2
Posts: 372
Reputation: 1,794

Post » Tue Feb 02, 2010 6:01 am

That would depend on how you are picking, but to get that instance you would probably use the UID.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Tue Feb 02, 2010 6:16 am

B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Tue Feb 02, 2010 10:44 am

[quote="Guyon":38vtbozs]How is this?

http://www.box.net/shared/yrvp2xyfjm[/quote:38vtbozs]

I tried to load that and I receive an Out of Memory message box...
B
2
G
2
Posts: 20
Reputation: 690

Post » Tue Feb 02, 2010 12:43 pm

[quote="raul":tnip6o0f]I tried to load that and I receive an Out of Memory message box...[/quote:tnip6o0f]

It's made in a newer version of Construct. The latest version is available in the Construct Discussion forum, stickied at the top.

[quote="Guyon":tnip6o0f]How is this?

http://www.box.net/shared/yrvp2xyfjm[/quote:tnip6o0f]

I'm pretty sure he wants to be able to target multiple enemies, and that's just one enemy.

Here's a method for multiple enemies:
http://dl.dropbox.com/u/529356/targeting.cap
uses v0.99.82

It's not perfect, for some reason every once in a while the missiles decide they don't want to pick a target. I don't really feel like tracking down why it doesn't work 100% right now. But it works most of the time, so it should be a good starting point to figuring out how to make your own missile tracking system.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Feb 02, 2010 3:07 pm

[quote="deadeye":2aswjczq]
I'm pretty sure he wants to be able to target multiple enemies, and that's just one enemy.
[/quote:2aswjczq]


Well looks like I am the real "Dead Eye" with this game. I never miss! LOL

Nicely done BTW
B
28
S
8
G
8
Posts: 530
Reputation: 7,154


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests