# Shooting game

**URL:** <https://forum.kirupa.com/t/shooting-game/13739>\
**Category:** flash\
**Created:** [February 17, 2003, 4:54pm UTC](https://forum.kirupa.com/t/shooting-game/13739 "2003-02-17T16:54:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![G\_Fresh](https://avatars.discourse-cdn.com/v4/letter/g/8491ac/32.png) [@G\_Fresh](https://forum.kirupa.com/u/G_Fresh)\
**Post date:** [February 17, 2003, 4:54pm UTC](https://forum.kirupa.com/t/shooting-game/13739/1 "2003-02-17T16:54:05Z")

</div>

I used the shoot tutorial and it works fine I was just wondering how you make it shoot people, and have them shoot back and keep score and keep track of your life. Like an old atari shooter 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:** [February 17, 2003, 5:19pm UTC](https://forum.kirupa.com/t/shooting-game/13739/2 "2003-02-17T17:19:04Z")

</div>

I would be interested as well! I say more game tutorial at kirupa!:rambo:

---

<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:** [February 17, 2003, 6:24pm UTC](https://forum.kirupa.com/t/shooting-game/13739/3 "2003-02-17T18:24:27Z")

</div>

There are more tutorials currently being made for game interaction. However we’re not really sure when they will be coming out. But they are being planned. Also G-Fresh, could you please change the size of your footer. The Administrators have requested that the maximum size be 300 width by 60 height.

Thank you.

[http://www.kirupa.com/forums/footer.htm](http://www.kirupa.com/forums/footer.htm)

---

<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:** [February 17, 2003, 6:25pm UTC](https://forum.kirupa.com/t/shooting-game/13739/4 "2003-02-17T18:25:14Z")

</div>

To elaborate on G-Fresh’s request, it would be nice with a game tutorial showing the following:

- Two “characters” both controlled by humans on same comp or comp vs human

- Simple shoot to kill and if playing against comp, the comp must attempt to “dodge” bullets but at the same time kill human

- Ability to use diff weapons, i.e. maybe have 2 diff. types of guns at the same time and changing which is “active” with F1 or something

- Life display, if shot two lives remaining or a health indicator!

- Anything else is welcome

Anyone want to write this tut?:sure:

---

<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:** [February 17, 2003, 6:28pm UTC](https://forum.kirupa.com/t/shooting-game/13739/5 "2003-02-17T18:28:05Z")

</div>

The only problem with your first two request is that it incorporates Artificial Intelligence and AI isn’t something that you can just whip out a tutorial for. It requires logic and math and alogorithms and things that I can’t spell.

---

<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:** [February 17, 2003, 6:30pm UTC](https://forum.kirupa.com/t/shooting-game/13739/6 "2003-02-17T18:30:54Z")

</div>

Ok I understand that AI is needed but if we put aside the comp function then a game where two humans play against each other on the same computer must be possible to do!

---

<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:** [February 17, 2003, 6:37pm UTC](https://forum.kirupa.com/t/shooting-game/13739/7 "2003-02-17T18:37:10Z")

</div>

well thats possible, but that is just modifying existing tutorials…  
like this one:

[http://www.kirupa.com/developer/mx/movement\_keys.htm](http://www.kirupa.com/developer/mx/movement_keys.htm)

---

<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:** [February 17, 2003, 6:46pm UTC](https://forum.kirupa.com/t/shooting-game/13739/8 "2003-02-17T18:46:55Z")

</div>

OK so now I can move but what about if I fire on my opponent how do I make his character “get hit” and die or loss health? I know it involves collision detecting, but how is this done?

---

<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:** [February 17, 2003, 6:52pm UTC](https://forum.kirupa.com/t/shooting-game/13739/9 "2003-02-17T18:52:31Z")

</div>

[http://www.kirupa.com/developer/actionscript/hittest.htm](http://www.kirupa.com/developer/actionscript/hittest.htm)

then its just manipulating Variables.

You don’t necessarily need a tutorial on how to make the game, you just need to modify the existing tutorials to achieve the effects you want.

Now you can move, shoot, detect the collision of hits and therefore you can die.

A life bar? Well that is just making something shorter (modifying either \_xscale or \_yscale) when something gets hit (hitTest)

---

<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:** [May 8, 2003, 11:00am UTC](https://forum.kirupa.com/t/shooting-game/13739/10 "2003-05-08T11:00:19Z")

</div>

> \*Originally posted by cookie \*  
> \*\*OK so now I can move but what about if I fire on my opponent how do I make his character “get hit” and die or loss health? I know it involves collision detecting, but how is this done? \*\*

You could also make the health bar a MovieClip. In the healthbar you have the fill shrink. (Best way to do this is with a motion tween) then add a keyframe on everyframe. Add a stop action on every keyframe. Then add a hittest to the enemey or player. You might need to change the variables:

onClipEvent (enterFrame) {  
if (player.hittest(\_root.foe)) {  
\_root.health.play(11);  
}  
}  
(If you wanted to add this to the player or foe you would replace player with This) Anyway if your still stuck heres a file I’ve made. Its an updated verison of the fire tutorial. Hope it helps.

---

<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:** [May 17, 2003, 5:06am UTC](https://forum.kirupa.com/t/shooting-game/13739/11 "2003-05-17T05:06:19Z")

</div>

sweet tut will yah explain it a lil more?
