User Tag List

Results 1 to 10 of 10

Thread: Shadow scale on player jump

  1. #1
    Clicker Multimedia Fusion 2Android Export ModuleiOS Export Module
    loglady's Avatar
    Join Date
    Jul 2011
    Location
    Twin Peaks
    Posts
    192
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Shadow scale on player jump

    Hello everyone!

    Could somene please help me with this?

    I have a blob shadow that always follows the player. When the player jumps I'd like the shadow to scale gradually down to 0 at the maximum jump height and after this, the shadow gradually scale back to full size (that is when the player hits the floor).

    How can I do this?

    Thanks in advance!

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1-(Y Bottom( "Player" )-Y( "Shadow" ))/64.0


    Where 64 is the max jump height in pixels.

  3. #3
    Clicker Multimedia Fusion 2Android Export ModuleiOS Export Module
    loglady's Avatar
    Join Date
    Jul 2011
    Location
    Twin Peaks
    Posts
    192
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Jacob, this formula is doing the inverse: When the player is at the maximum height the shadow is scaling up and when the player is on ground he shadow is scaling down.

  4. #4
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, my logic was backwards then. Remove the 1-

  5. #5
    Clicker Multimedia Fusion 2Android Export ModuleiOS Export Module
    loglady's Avatar
    Join Date
    Jul 2011
    Location
    Twin Peaks
    Posts
    192
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    now the shadow don't show

  6. #6
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you make sure to put 64.0 rather than just 64? If the .0 isn't there, it will be treated as an integer and give a whole number answer rather than a decimal.

  7. #7
    Clicker Multimedia Fusion 2Android Export ModuleiOS Export Module
    loglady's Avatar
    Join Date
    Jul 2011
    Location
    Twin Peaks
    Posts
    192
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah. I'm pretty sure about that 64.0.

    That is what happens: the player is on ground -> the shadow scales up. the player is jumping -> the shadow scales down (shrink).

    What I want to happen: the player is on ground -> the shadow scales down (shrink). the player is jumping -> the shadow scales up.

  8. #8
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,754
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Loglady. I have an example on my website, but no formulas and the example is done in isometric:

    http://www.castles-of-britain.com/mm...page12.htmMarv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  9. #9
    Clicker Multimedia Fusion 2Android Export ModuleiOS Export Module
    loglady's Avatar
    Join Date
    Jul 2011
    Location
    Twin Peaks
    Posts
    192
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Marvim, nice example! Gave me an idea for something. Not solved my problem, anyway.

    I solved using "alpha blending coefficient" - "the distance of the player from the ground".

    Thanks all for your time and help.

  10. #10
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,754
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Glad it's solved.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Similar Threads

  1. How to make jump sound longer or shorter depending on jump height?
    By Storsorgen in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 8th December 2013, 01:28 PM
  2. How to make the player jump?
    By Fizzypop56 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 1st August 2013, 12:27 AM
  3. Setting the Scale of an Object to the Scale of the Object it was Created From
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 26th July 2013, 07:53 PM
  4. Guitar/Scale Player Extension
    By Iwantmyrpg in forum Extension Development
    Replies: 6
    Last Post: 29th June 2010, 11:45 PM
  5. Making player Jump??
    By hendrix in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 12th May 2009, 04:42 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
  •