-
im also working on a fighting game. it is pretty bad, though. i have found that you dont really need to use all of the platform scripting. i made it 2 player so you dont have to do any complicated AI junk. one cool easy little thing to do is make life percentage things. this is the code i have:
onClipEvent (keyDown) {
if (hitTest(_root.p2.p2fist)) {
_root.p1life -= 10;
}
if (key.isDown(Key.SHIFT)) {
tellTarget ("_root.p1") {
gotoAndPlay (4);
}
}
if (key.isDown(Key.RIGHT)) {
tellTarget ("_root.p1") {
gotoAndStop (2);
}
tellTarget ("_root.p1") {
_root.p1._x += 15;
}
}
if (key.isDown(Key.LEFT)) {
tellTarget ("_root.p1") {
gotoAndStop (3);
}
tellTarget ("_root.p1") {
_root.p1._x -= 15;
}
}
}
-
thanks man i started a bit of ai.
-
Hello again, I need a code that will make it so that when all of my life runs out it goes to a game over screen? so far I have all the enimies and life metor and stuff, my coding so far is
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
_root.life -= 1;
}
}
Thanks, and esspecially to Mad Sci for putting together this great tut! p.s. how do you do smilies!
-
i did a code on the life. my life meter was a MC with three ball graphics. the number of balls went don each time hero got hit. on the final frame, i told the root timeline to goto and play frame 2(which said game over)all you have to write on the last frame actions is this:
gotoAndStop (2);
-
Thats a good idea but the reason I am using percentage is that whe an enemy hits my player it is very sensitve and one hit would take all three balls down is there a way I can make the hero so sensative?
-
what is the code for the a key becuase there are only a few keys that are already preset
-
how do you make it minus one ball each time you get hit
-
hello
hello im trying to make a scrolling
version of this game, something like the robbie williams game but it's not happening
the ball movie clip just goes to the top of the movieclip and keeps falling, can someone help
-
To make balls disappear, you first have to make a MC with the variable name "life" (without the quotes). then, inside that clip, you make 3 balls on the first frame. give the frame a stop action. then, in the second frame, give it only 2 balls with a stop action. on the next... you guessed it, 1 ball and a stop action. on the next frame, make it blank with these actions:
tellTarget ("_root.hero") {
gotoAndStop (2);
}
(you have to have a blank frame in the hero MC with a stop action.)
to make the balls disappear when he gets hit...
give the enemy, whatever it is, these actions:
onClipEvent (enterFrame) {
if (hitTest(_root.hero)) {
tellTarget ("_root.life") {
nextFrame ();
}
}
}
thats all.
-
how can i use other keys as buttons
ill put the new version of my game on the net today
-
what exactly do you mean? do you mean do other keys? if you do that, its easy, but it will take a while for me to explain it to you. if you are in normal mode, go to the objects book, then the keys book. there are a few of the major keys to choose from. if you are not satisfied, you can type in the key code, instead of the Key.WHATEVER .
i cannot say them all in this post, but if you ask for certain keys, i have a flash book thats lists them so i could tell you.
-
Here is an early version of my game it has one level info and please feel free to critise and change any problems!
http://www.geocities.com/experimenta...tform_game.zip
-
Senior Member
ATTENTION ALL
New ver. of the tutorial..
1. improved speed
2. some minor bugs fixed.
3. jump tru plat not possible..
4. 2 ladders..
5. 1 pick item..
using the laddres:
ladder 1: non-restricted on top
ladder 2. restricted on top..
you can snap ladder 1 and on top ladder 2 to make one big ladder..or use ladder 1,,ladder1,,ladder2 for a realy big one..
Ok let me know of any bugs Flash is acting strangely nowadays..
mad_sci
http://savco.virtualave.net/plat.zip
-
i want to use e s d x c v b n could you tell me the code for those thanks
-
hey mad sci can you tell me the code to make it so if the life variable reaches 0 a certain thing will happen.
-
Hey Kbomber I need the same thing! I f you Find it please tell me
-
i know how
place a input text in your movie give it the variable name
"_root.life" (no brackets) in the first main frame give it the action "life = 100" if 100 is your life, then make a MC have an empty keyframe in it with the frame actions
if (_root.life <= 0) {
tellTarget (_root) {
gotoAndStop ("End", "end");
}
}
so if _root.life = 0 it looks in the main movie and goes to (in this code) a scene called End with the frame lable end
then put that in the same frame/scene as the input box called _root.life
-
E:69
S:83
D:68
X:88
C:67
V:86
B:66
N:78
voila!
by the way MadSci, thanks for the ladders
-
Senior Member
I think that with this the tut. is over right..I mean we got the platforms, the ladders, the hero, and pick item..
we also have jump, climb, walk..
So whats next
mad_Sci
-
well...
i seem to have trouble making the enemys move. i put them inside a movie clip and use tweening. i have the hitTest coded to the enemy (so its looking for collision with the hero, not the other way around.) whats wrong with it?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|