Groups | Blog | Home
all groups > flash actionscript > may 2004 >

flash actionscript : help game problem guess hitTest


marcelozep
5/15/2004 11:29:53 PM
Hello there, i was searching for a real functional script for my game.
Its a tank game:
You are a tank, and you have an enemy. Another tank that tries to shoot on
you. Theres an ambient, like limits on the stage, that the tank cant go
through, like bars, squares, for a little dificult in the game.
My guess in the start was to get the maze script from flash samples, im
talking about hitTest here. In the maze game, the square cant go through the
limits as my game, but, it didnt work. What happens is:
The tank pass through when it reachs the limits, like pressing two or more
keys making a diagonal movement.
Please, if somebody can help me, will be great.
Many Thanks.
Shan-Dysigns
5/15/2004 11:44:11 PM
marcelozep
5/15/2004 11:47:03 PM
see the post again now plz
BanhBaoX
5/16/2004 5:33:44 AM
Since your bullets hit the wall n bounces back.... your hitTest is working. The
problem is probably that you didn't tell the tank to stop when it hitTests the
walls.

if tank.hitTest (walls) {
velocity=0
}

Something of that nature. So long as you tell your speed to just turn off.
What's going on in the game is that the speed is just continuing even though
it's hit the walls.
AddThis Social Bookmark Button