dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Breakout / Arkanoid

  1. #1
    Junior Member
    Join Date
    Sep 2000
    Posts
    6
    Hi there!

    In here, I have been looking for any Breakout / Arkanoid - .fla files that provide a little information about using "powerups" in the game. But i couldn´t find anything useful, except this file http://www.flashkit.com/movies/Games...05/index.shtml It is a little Breakout version, but it also has no POWERUP functions and i think it becomes boring after a while...

    I want to realize only a small part of this great version: http://www.cre8ive-grafx.de/flashout2/index2.html

    You guessed it -> the powerups...

    So, is anybody out there able to add just a little powerup to the above X-Ball file ? I´d really appreciate your help !

    Thank you in advance,

    Julia

  2. #2
    Junior Member
    Join Date
    Sep 2000
    Posts
    6
    hey it´s me again, and i found a site, which used the original X-Ball .fla from flashkit.com, and they added powerups... etc ! (You can see that´s it is from here) Here´s the link: http://www.creative-flow.com/games/a...cs/bricks.html


    Is it so difficult to create extra functions ???

    Bye bye
    Julia

  3. #3
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,796

    Yes it is easy

    It's VERY easy.

    So do it.

  4. #4
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    Ok this is what you can try.

    1. create the powerups Mcs outside of the stage.
    2. in each brick mc:

    when thre is a collision --- generate a random number let say 1-5 if it hapans to be 3 for example, pick a random powerup..duplicate it so it moves down---remove the brick.

    you have to script each power up separately. for example:

    if the pad will expand you can use _root.pad._xscale upon collision with the pad.

    and remove the power up with removeMovieClip();.

    mad_sci

  5. #5
    Junior Member
    Join Date
    Sep 2000
    Posts
    6

    resolved

    Hey cool, thank you guys finally, somebody wrote an answer !!

    Thanks for your help !


    Julia

  6. #6

    bricks game

    hey cool someone link to my site OK so I'm easily impressed.

    I was looking for an answer to a collision problem and cam accross your post, seeing as how I am in the middle of writing a new breakout clone i though I would share some code with you.

    I placed the prize mc's in the main timeline and then when a brick is destroyed it calls this function

    // Prize generation function
    function spawn_prize (targetx, targety) {
    tmp_prize = random(125);
    if (tmp_prize>98 && tmp_prize<100) {
    duplicateMovieClip ("_root.prize_l", "prize" add _root.prize_layer, _root.prize_layer+500);
    eval("_root.prize" add _root.prize_layer)._x = targetx;
    eval("_root.prize" add _root.prize_layer)._Y = targety;
    _root.prize_layer++;
    } else if (tmp_prize>50 && tmp_prize<75) {
    duplicateMovieClip ("_root.prize_m", "prize" add _root.prize_layer, _root.prize_layer+500);
    eval("_root.prize" add _root.prize_layer)._x = targetx;
    eval("_root.prize" add _root.prize_layer)._Y = targety;
    _root.prize_layer++;
    } else if (tmp_prize>75 && tmp_prize<100) {
    duplicateMovieClip ("_root.prize_s", "prize" add _root.prize_layer, _root.prize_layer+500);
    eval("_root.prize" add _root.prize_layer)._x = targetx;
    eval("_root.prize" add _root.prize_layer)._Y = targety;
    _root.prize_layer++;
    } else if (tmp_prize>100 && tmp_prize<125) {
    duplicateMovieClip ("_root.prize_f", "prize" add _root.prize_layer, _root.prize_layer+500);
    eval("_root.prize" add _root.prize_layer)._x = targetx;
    eval("_root.prize" add _root.prize_layer)._Y = targety;
    _root.prize_layer++;
    }
    }


    Each prize mc then handles it's own movement and awards the according prize depending on what it should be.

    Hope this helps,

    Cheers,
    Clayton
    http://www.creative-flow.com

  7. #7
    Junior Member
    Join Date
    Sep 2000
    Posts
    6
    Hi Clayton,

    thank you very much for your answer. I am still confused of this "power-up" thing. I think it is very hard to understand action-script from someone other´s. - Or is this just me who is quite unable to write some good action-script ?

    So, I wanted to ask you to send me a very small .fla - file that explains itself ? I really don´t know how to build your AS into my movie. Hmmm, bye for now and thank you in advance

    Julia


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center