User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: How can I control bouncing items gravity, time in air, and falling position?

  1. #1
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    715
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Question How can I control bouncing items gravity, time in air, and falling position?

    Hey Clickteam,

    Is there a tutorial or example of an object bouncing on a trampoline, with natural controlled gravity and positional falling? Thanks Clickers!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    823
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are many different ways. One way is to use the platform movement extension. It allows you to set an object's Y velocity, which is all you really need.

    If it were me, I wouldn't use any movements or extensions. It's very easy to get an object falling with gravity. Just give it two alterable values, YReal and YVel, then do the following:

    Start of frame -->
    Set YReal of "Active" to Y("Active")

    Always -->
    Add 0.1 to YVel("Active")

    Always-->
    Add YVel("Active") to YReal("Active")

    "Active" overlaps "Trampoline" + YVel("Active") > 0 -->
    Set YVel("Active") to YVel("Active") * -1

    Always-->
    Set Y of "Active" to YReal("Active")


    The reason for the nonsense with YReal is because we need to store a float value for smooth movement. Somehow Clickteam still hasn't added support for float X/Y coordinates (as far as I know), so this cumbersome extra step is always necessary for most custom object behaviors.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Ehm, may I go completely off-topic here?

    @UltimateWalrus: your website is insanely cool
    ...and I've probably messed things with a comment (on your rocking UFO object) containing ""
    resulted in >
    sorry

  4. #4
    Clicker Fusion 2.5 DeveloperSWF Export ModuleInstall Creator Pro

    Join Date
    Jun 2006
    Location
    France
    Posts
    1,266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    think of the ball as a platformer. google platformer engine. and replace the character with a ball. remove controlls. voila.

    -or-

    use MMF built in movements (like directional, physics or platformer)

    -or-

    write your own and play arround with adding/substracting to X/Y values/positions.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module

    Join Date
    Dec 2008
    Location
    Italy
    Posts
    404
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by schrodinger View Post
    Ehm, may I go completely off-topic here?

    @UltimateWalrus: your website is insanely cool
    ...and I've probably messed things with a comment (on your rocking UFO object) containing ""
    resulted in
    sorry
    I noticed it too yesterday! It's awesome! (sorry everyone for keeping the post off-topic )

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export Module

    Join Date
    Nov 2013
    Location
    San Diego, CA
    Posts
    42
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Back on topic: would this same method mentioned allow for say an effect in platform game where -
    the character could knock enemy into air, jump and hit a 2nd time - but have everything PAUSE right before enemy is sent flying.
    Similar to Super Smash Bros...or even allow pauses of varying degrees to give effect of powerful hit?

    I've always wanted to see an example of this done... anyone know of one or willing to put something together?

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,112
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    I can't stress enough how primitive this example is - but it at least shows some of the basic idea!
    Attached files Attached files

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    argh, just noticed I messed here too... damn emoticons

    ...and I've probably messed things with a comment (on your rocking UFO object) containing ""
    resulted in
    should have been --->

    ...and I've probably messed things with a comment (on your rocking UFO object) containing "> : D"
    resulted in [..messed ascii charcode..]
    sorry guys, last off-post here!


    Btw, very nice example DaveC, really feels like knocking in mid-air!

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export Module

    Join Date
    Nov 2013
    Location
    San Diego, CA
    Posts
    42
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks DaveC!

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    823
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks very much for the kind words :] I just made a post about my website in the off-topic community forum so people can talk about it there if they want.

    http://community.clickteam.com/threads/94940-New-Ultimate-Walrus-website

    Regarding your comment on UFS... I think I fixed it? Just let me know what you meant to type and I can change it :P My comment posting script is probably not perfect.

    That punch example is pretty cool! One thing to note is that if you want all of the action in the entire game to stop for a fraction of a second or more, you can keep your events in a giant group, and deactivate it temporarily to pause things.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 6
    Last Post: 19th August 2015, 08:45 PM
  2. [Example] Custom movement of falling and bouncing
    By Olivier in forum Guides, Tutorials, Examples, Widgets
    Replies: 0
    Last Post: 6th February 2014, 08:07 PM
  3. Gravity and Time Slowdown
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 2nd May 2012, 06:28 PM
  4. Bouncing Ball with gravity? Switch animation?
    By GameDevs in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 29th July 2010, 05:30 PM
  5. Bouncing Ball movement with simple Gravity
    By Sarah in forum File Archive
    Replies: 3
    Last Post: 16th July 2007, 01:00 PM

Posting Permissions

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