The Daily Click ::. Forums ::. Klik Coding Help ::. Missile Command - Help!

Post Reply  Post Oekaki 

Posted By Message

Brian Haase (FSP)

27th January, 2005 at 15:18:52 -

I have a plan for a cool version of Missile Command that i'm going to build with The Games Factory - Assuming, of course, I can get the launchers working. So I have two questions:

1. How do I make the bases fire missiles towards the mouse cursor and detonate there? I have a crosshair object, and the bases can fire - but 'fire relative to object' and such doesn't want to work right - The bullets won't use the right angle needed to reach the target. They also won't detonate when they get there...

2. How do I create a laser trail? This is a bit more of a minor feature, but i'd like to use the classic style Missile Command with the laser trail from the missiles, that remain until the parent missile is destroy and then fade out. Is there some sort of sprite I need to create and drop or something?

I would appreciate any help you could give me, i'm obviously a n00b but i'm trying to improve my skill so I can design some decent games - I have better ideas that i'm holding onto until I can build a proper system capable of handling it - Until then, it's arcade games and simple platformers.


Current Projects:
Bomb Squad (Total Progress - 3%)
:: Current Task Progress: 40%
:: Current Task - Level Editor Shell

David Newton (DavidN)



Honored Admin Alumnus
27th January, 2005 at 15:26:35 -

The trouble is that TGF can't handle more than 32 directions on its own - for more, you could try using the Direction Calculator extension (look it up on Google or the extensions list at Clickteam) but I'm not sure how much it would help, as I've never used it myself.

To get them to detonate when they reach the target, you'll have to make the cursor "drop" an invisible target object for a missile when you click. When the missile collides with its target object it should destroy itself and its target.

Laser trails will be difficult to achieve, as TGF has a low object limit. However, you could create a "trail" object (a simple red circle) constantly at the position of missiles, and continually add 1 to their Alterable Value A. When Value A reaches over 10 or so, destroy the trail object.

Most games are more difficult to code than they look. - Games, music, living in America


Master of all things Klik


Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
27th January, 2005 at 17:17:11 -

You could use a bit of trigonometry for the angle thing


Post Reply



Worth A Click