please help in my first proper game in flash. The problem is that when you shoot the man he dies but once he's shot and you shoot him again he comes back alive and you can shoot him again. also I don't know how to make ammo and i want to use it. another problem is i don't know how to make the bullet do a crack in the building if it is shot. the crack image is the 'crack' symbol in the library. if you'd like to take a look at the thing then here's the download:
.fla: [url=http://www.mediafire.com/?uzdzugoznm2]
.swf: [url=http://www.mediafire.com/?nmz1mjtwa3i]
hope someone can help. also, im a beginer so if you could explain the actionscript then that would help. thanks
This might not be the easiest way to do it, but it'll work. In the first frame of man1 add: dead = false; and in the final frame add: dead = true; Then, on the man1 MovieClip, set it to only play the man's death if dead == false.
For the crack, convert the building to a MovieClip and on it's actions add:
For ammo, create a variable for how much ammo you have left, and every shot decrease the variable by one, and only shoot if the ammo you have left is > 0
btw i think it should be on(press) { var createcrack = _root.attachMovie("crack","crack", _root.getNextHighestDepth(), _root.getNextHighestDepth()); createcrack._y = _root.aim._y createcrack._x = _root.aim._x }
and if you got a mouse hide and a startdrag aim you should name it to your pointers name example: createcrack._y = _root.arrow1._y createcrack._x = _root.arrow1._x