A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 33

Thread: Jumping!

  1. #1
    Junior Member
    Join Date
    Dec 2005
    Posts
    5

    Jumping!

    I have looked all over... but I cant find anthing that works, my problem is not landing its stoping. Once my object begins to move up how do I stop him when he reaches a certian point and make him fall?

    -Thanks

  2. #2
    Game Master ConnELITE's Avatar
    Join Date
    Apr 2005
    Location
    United States, DC
    Posts
    474
    I assume you use 3dfa first of all, and mabey be more detailed when asking your question, if I didnt notice the title I wouldnt know what you were talking about lol. Anyway I would say make a "keyboard" element, inside the keyboard element make a button, make the button uhhh the space bar or watever. Say "set property" under the spacebar button, select you element in the first box, in the second box select "Y velocity" if thats not there make sure your element has velocity and acceleration enabled. Anyway, in the third box type -100 or watever, just make sure its negative. Copy the "set property" you just made and paste it under the spacebar again. Change the y velocity to y acceleration and change the -100 to like positive 50 or watever. Then Make a bar at the bottom of the screen and call it "ground" then make a collision script saying if your dude collides with ground then Y velocity=0 (which you can see an exaple of in brets tutorial thread in the main forum). or you wanted another way you could get rid of the acceleration part and make a script saying
    If (yourguy.y<0){
    yourguy.velocity.y=100
    }

    that makes your dude start going down as soon as he hits the ceiling, I hope this helps.
    BC

  3. #3
    Senior Member
    Join Date
    Feb 2005
    Posts
    177
    sweet, I never knew how to do this, maybe one day when I get some time I could actually put a platformer game in the works!

  4. #4
    Azerith
    Join Date
    Dec 2005
    Location
    Millington,TN
    Posts
    13
    Yeah, I might use this info if I try to make a game with 3DFA.

  5. #5
    Junior Member
    Join Date
    Dec 2005
    Posts
    5
    Thats what I wanted to know, Thank you so much.
    Aslo where us "brets tutorial"

    Thanks again

  6. #6
    Member MoonRise's Avatar
    Join Date
    Sep 2004
    Location
    Greenville SC
    Posts
    121

    Look Up.

    Look at the top of this forum at the "Stickys":

    "Sticky: Online Tutorials"
    LINK
    Last edited by MoonRise; 12-21-2005 at 10:18 PM. Reason: Add URL
    MoonRise

  7. #7
    Junior Member
    Join Date
    Dec 2005
    Posts
    5
    Sorry, I didnt know bret was blanius

  8. #8
    Azerith
    Join Date
    Dec 2005
    Location
    Millington,TN
    Posts
    13
    Brets Tutorials helped me alot

  9. #9
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244

    Example of jumping/moving

    I've attached an example for you to study. Play with the values For Velocity and Relative acceration. You could but them in some if statements so that for example if on a certain block he'd jump higher or something.

    Also if you go to make a platform game I suggest you put all your collidable objects into an Array of elements that way you can loop through them in script rather than having to check each one in seperate bit of code.

    In start script make empty array

    myObjects=new Array()

    then put the elements in this array.
    Attached Files Attached Files
    Last edited by blanius; 12-22-2005 at 09:23 AM.

  10. #10
    Junior Member
    Join Date
    Dec 2005
    Posts
    5
    ...blanius you are amazing, thank you so much!!

    One problem, when i put the fps to 20 the jump work correctly is there any way to fix that?

    here is my file

    Also when i export it as .swf it wont jump...
    Attached Files Attached Files
    Last edited by Unlimited; 12-22-2005 at 09:31 PM.

  11. #11
    Senior Member
    Join Date
    Feb 2005
    Posts
    177
    you said to look carefully at the properties of the skull and bones ( changed the file location to my mario pic) but how do I view the properties of the skull and bones? You mentioned relative acceleration in its properties but I cant find it.

    Sorry, but I have never worked with importing files, I usually just draw mine in my game while I'm working on it, so I dont know how to view the properties.

    So what do I click on to view the properties of the SKull and Bones?

    thanks

  12. #12
    Game Master ConnELITE's Avatar
    Join Date
    Apr 2005
    Location
    United States, DC
    Posts
    474
    hmm well it was a very nice flash blanius although I think there was a lot more stuff in it then needed. Here check out my version, I just took bret's and made a few changes. Also the reason it wasnt wokring on export was because it says that velocity=0 when on floor so it cant jump while its on the floor, I made a complicated change to fix this although I think there would probaly be an easier way to do it. I am personally not happy with this movie, it seems too...meh. Mabey you can mess around with it and find a better way, this one works in exports I checked btw.
    Attached Files Attached Files
    BC

  13. #13
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244

    ARgggg!

    Dang it 3dfa bugs strick again. Sorry guys it's this kind of export bugs that led me to move to Koolmoves for most of my work.

    You could code this by hand but it's complicated and frankly I don't have the time or interest to spend on it.

  14. #14
    Game Master ConnELITE's Avatar
    Join Date
    Apr 2005
    Location
    United States, DC
    Posts
    474
    open skull and cross bones imgae, scroll down to the check boxes with "element has properties", below that is a thing that says "position and velocity" click the box that looks like an x thats next to it.
    BC

  15. #15
    Senior Member
    Join Date
    Feb 2005
    Posts
    177
    ok, thanks

    I could do a whole lot of experimenting with a platformer...... So many ideas!

    But I just have to finish the game Im working on right now, I'm about 60% done ( its a ship game)

  16. #16
    Game Master ConnELITE's Avatar
    Join Date
    Apr 2005
    Location
    United States, DC
    Posts
    474
    yes this bug is very annoying, however i think my way works pretty good, good thing i dont make these kind of games . Oh and i emailed kusco and he said he talked to rob and the new version is still being worked on so thats good to hear I guess.
    BC

  17. #17
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590
    Well, I guess that means the new version's going to be fantastic, after over a year of development

    Nice to hear something positive, even if I'll take it with a pinch of salt at the moment!
    Please note that my domain has changed to http://www.morganmultinational.com

  18. #18
    Member MoonRise's Avatar
    Join Date
    Sep 2004
    Location
    Greenville SC
    Posts
    121

    Too Little Too Late?, maybe....

    I'm glad to hear that Rob is still working on it. It will be nice to have that, but I will be honest, I'm looking over KoolMoves now. BLanius is in that Forum as well and can help switch since he use to be a 3DFAer him self.
    MoonRise

  19. #19
    Game Master ConnELITE's Avatar
    Join Date
    Apr 2005
    Location
    United States, DC
    Posts
    474
    meh, I was looking over koolmoves and it doesnt seem very game friendly. It is more up to date though. Looks very nice for websites and text effects too. I think Im too stubborn to switch anyway . I'll probaly be using this version to make games forever lol.
    BC

  20. #20
    Member MoonRise's Avatar
    Join Date
    Sep 2004
    Location
    Greenville SC
    Posts
    121

    I agree

    Trust me. I don't really want to, but most of what I do is website stuff. No, as far as games, it would be quite involved. I really do still like 3DFA's concept of elements that are called upon when needed not "timelined". 3DFA is programming that I really understand, but I am willing to learn new concepts so I'm trying.
    MoonRise

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