PDA

View Full Version : hit the ghost game


anurag
07-17-2007, 05:36 PM
Hello everyone i am working on a project where there is a gun b/w a circle and a ghost clip should be randomly duplicated around the circle.user will enter the angle and the gun will fire in that direction.But I dont know how to start .If anybody help it will be highly appreciated.Pleeezzz help me out of this
Thanks in advance

whizkid1990
07-17-2007, 06:21 PM
soo... is it sort of like a turn-based game where everytime you hit the
ghost(which doesnt move ?) another one is dynamically generated ??

Anyway I think the things you need to know are stuff like
1) Finding the _x and _y value based on your angle input.
input: 90
_x= ??
_y= ??
the bullet movement from the gun is based on the _x and _y values that you calculate.
2) "randomization" for the generation of ghost movieclip
3) _rotation for the gun movement based on angle, which is simple enough
_rotation= 96; (your input)
4) hittest for bullet clip against ghost clip
5) duplicateMovieClip or attachMovieclip for ghost clip, for attachMovieclip you should know how to do the linkage from the flash library.
Also use removeMovieclip when the ghost is hit or bullet leaves the stage

anurag
07-18-2007, 08:33 AM
Is there any such game out there or tutorials to help me

whizkid1990
07-19-2007, 03:08 PM
maybe searching for a "space invader game" and "angle calculation" tutorial would be helpful