Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.


Results 1 to 8 of 8

Thread: Newbie at programming. Please help

  1. #1
    elPooter's Avatar
    is there an echo in here?

    Newbie at programming. Please help

    Hello, I am new at programming and I NEED help. I want to program a side scrolling action game, and I need some one to teach me the code, and to help me make this game. Specifically, the code for the characters jumping, some moving platforms, and duplicating enemies. If anyone would like to help, please reply.thanks.

  2. #2
    Registered User

    Whoa, thats a lot of help there. If I were you, I would go through those one at a time, looking for posts regarding each issue.

    I will try to help you with some of that code though. Duplicating enemies is pretty easy. Make a movieClip that is supposed to be the enemy. Say an evil frog. Place that frog on the stage. Then use the duplicateMovieClip() function to make copies of this evil frog.

    I use a for loop to create these extra movieClips.

    for (i=0;i<11;i++){ 
    evilFrog_mc.duplicateMovieClip("evilFrog"+i, i);
    /* i hope you know for loops  */
    /*  also, the "evilFrog"+i, creates the new name for each instance created by the duplicateMovieClip code, and the "i" adds it to the a higher level on the stage. */
    You can use if/else statements to remove these movie clips once they get to the edge of the stage, stuff like that to make it more interesting. Hope that helps.

  3. #3
    elPooter's Avatar
    is there an echo in here?
    Thanks, I will try that.

  4. #4
    elPooter's Avatar
    is there an echo in here?

  5. #5
    elPooter's Avatar
    is there an echo in here?
    Oops, sorry about that blank post.

    P.S. I am a newb at flash :\

  6. #6
    Maps, flash, FPS games...
    You can use the edit button to remove a post...
    Also, to do jumps, you should check out pom's physics page: http://www.kirupa.com/developer/acti...pt/gravity.htm

    Just have an "on key down" event which makes the character jump:
    when you press the jump key, if your character is on a ground platform (thus requiring some coding of boolean values) you suddenly give negative vertical speed to your character, thus making him go up.

    Of course, onEnterFrame, you apply gravity, thus whenever you jump or fall off a ledge, you will eventually begin to fall down until you touch a solid object (platforms, etc). So you jump up when you press your jump key, but immediately your momentum is reduced by the frame.

    I am myself looking for a scrolling snippet of code or explanation of just the mere functionalities of it, so I'd be interested in seeing a link posted here.

  7. #7
    elPooter's Avatar
    is there an echo in here?

  8. #8
    In other words to remove the blank post, you just click the edit button next to the blank post and in the edit area, select the button that says delete.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012