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.
I would be interested as well! I say more game tutorial at kirupa!:rambo:
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.
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:
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.
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!
well thats possible, but that is just modifying existing tutorials…
like this one:
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?
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)
*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.
sweet tut will yah explain it a lil more?