# I need help with a game badly :-\\

**URL:** <https://forum.kirupa.com/t/i-need-help-with-a-game-badly/96897>\
**Category:** Uncategorized\
**Created:** [December 15, 2003, 6:14am UTC](https://forum.kirupa.com/t/i-need-help-with-a-game-badly/96897 "2003-12-15T06:14:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdjstudios](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mdjstudios](https://forum.kirupa.com/u/mdjstudios)\
**Post date:** [December 15, 2003, 6:14am UTC](https://forum.kirupa.com/t/i-need-help-with-a-game-badly/96897/1 "2003-12-15T06:14:42Z")

</div>

ok this is edited! i changed my code. and moved it aorund. so it not as complicated as dong! where es my automobile! woops sorry for saying that. anyways. getting started.

i have 4 badguys name t1,t2,t3,t4 (instances).  
lets say for t4 i have this code.  
onClipEvent (load) {  
this.gotoAndPlay(“t4-1”);  
}on (press) {  
if (\_root.ammo.\_currentframe\<8) {  
gotoAndPlay(“t4-2”);  
}  
}

(t4-1) is the popping out and shooting and repeating  
(t4-2) is the dying part.  
ammo is the instance/variaible of a mc. means that if frame has any bullets in it (fram 1-7) then u can play the dying part.

for my mouse and gun and stuff heres the code.  
onClipEvent (enterFrame) {  
\_x = \_root.\_xmouse;  
if (\_x\<=80) {  
\_x = 80;  
}  
}  
onClipEvent (mouseDown) {  
if (\_root.ammo.ammo\>0) {  
play();  
\_root.ammo.nextFrame();  
\_root.shot.start();  
} else {  
\_root.empty.start();  
}  
}

every time u click down it makes a bullet dissapear.  
fyi: i have 7 bullets

now for my problems, the guys will die ‘wierd’  
i have hp/dyn. text.box. this is ur health in the game. when it becomes 0 OR less than u die. how do i make it so when the hp becomes 0 OR less it will go to a scene.

one more thing. when u kill all the t1,t2,t3,t4… how i do i make it go to the next scene? can u give me some info or methods of doing these? plzzzzz

download the .fla if u want to its lots easier.

[www.freewebs.com/headface/shootinggameexample.zip](http://www.freewebs.com/headface/shootinggameexample.zip)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 15, 2003, 11:09pm UTC](https://forum.kirupa.com/t/i-need-help-with-a-game-badly/96897/2 "2003-12-15T23:09:40Z")

</div>

thats how i learned how to do this game.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 17, 2003, 2:58am UTC](https://forum.kirupa.com/t/i-need-help-with-a-game-badly/96897/3 "2003-12-17T02:58:05Z")

</div>

help anyone?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 17, 2003, 4:41am UTC](https://forum.kirupa.com/t/i-need-help-with-a-game-badly/96897/4 "2003-12-17T04:41:44Z")

</div>

bah. the script seems too unclear. try debugging it by tracing some steps. it’ll help :thumb:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 17, 2003, 5:58am UTC](https://forum.kirupa.com/t/i-need-help-with-a-game-badly/96897/5 "2003-12-17T05:58:45Z")

</div>

im not very good at AS but if u take a look at the .fla that should help lots :thumb:
