User Tag List

Results 1 to 9 of 9

Thread: Always - move object Y-1 is to slow, and always - move object Y-2 is to fast. help

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Always - move object Y-1 is to slow, and always - move object Y-2 is to fast. help

    I have water chasing the player up the level in my game, but I have problems adjusting the speed of the water.

    I have tried

    Always - Y( "Water" )-1 - But this makes the water go to slow

    Always - Y( "Water" )-2 - Now its going to fast

    So what is the easiest and best way to be able to adjust the speed to what I want? I want to use a speed that is dependent on the frame rate and not the timer.

  2. #2
    Clicker Multimedia Fusion 2

    Join Date
    Aug 2011
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Isn't the timer based on what the frame rate is though? If you have a frame rate of 100, the water will move much more quickly than at 60.

    You can try using floats. Name two alt.values "FloatY" and "Yspeed".

    Start of Frame
    --> Set FloatY("Water") to Y("Water")

    \\This sets the initial FloatY to the position of the water. If you don't do this, then the water's position will be where ever it was in the frame.

    Always
    --> Set FloatY("Water") to FloatY( "Water" )+Yspeed( "Water" )
    --> Set Y Position("Water") to FloatY("Water")
    --> Set Yspeed("Water") to 0.5 (Or whichever value you want)



    This way you can use decimals to give more accurate speeds. Remember MMF2 can only use integers for positions in the expression editor, so you have to do that workaround. (Ie, you can't do "Set Y position to 0.5")

  3. #3
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA 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)
    gkinfinity's Avatar
    Join Date
    May 2011
    Location
    USA
    Posts
    284
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yep, just do what oasuke said. Keep in mind that if you want the speed of the water to be constant but just want the speed to be in between 1 and 2 you only need one alterable value (lets call it 'YPos').

    Start of Frame
    --> Set YPos("Water") to Y Position("Water")

    Always
    --> Sub 1.5 from YPos("Water")
    --> Set Y Position("Water") to YPos("Water")

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by oasuke View Post
    Isn't the timer based on what the frame rate is though? If you have a frame rate of 100, the water will move much more quickly than at 60.

    You can try using floats. Name two alt.values "FloatY" and "Yspeed".

    Start of Frame
    --> Set FloatY("Water") to Y("Water")

    \\This sets the initial FloatY to the position of the water. If you don't do this, then the water's position will be where ever it was in the frame.

    Always
    --> Set FloatY("Water") to FloatY( "Water" )+Yspeed( "Water" )
    --> Set Y Position("Water") to FloatY("Water")
    --> Set Yspeed("Water") to 0.5 (Or whichever value you want)



    This way you can use decimals to give more accurate speeds. Remember MMF2 can only use integers for positions in the expression editor, so you have to do that workaround. (Ie, you can't do "Set Y position to 0.5")
    Thanks!

    One question though, is there a reason why I should have the last event?
    --> Set Yspeed("Water") to 0.5 (Or whichever value you want)

    Is it not as good to just change this value to what I want when I create it?

  5. #5
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You can set it when you create the object, but the alterable values in the frame editor only take integers
    Working as fast as I can on Fusion 3

  6. #6
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im kindof in a hurry, so i havent had time to read everyones post
    ...
    Outcast, i understand your problem

    - Give Water an Alterable value called MoveY_
    - Instead of 'allways set WaterY to WaterY -1' do 'always set WaterY to WaterY + MoveY_'
    - do 'Always add 1.5 ( or 1.25 or 1.75 or whatever you want ) to MoveY_'

    This way Water can move at speeds wich are inbetween 1 and 2 pixels per frame

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    You could also use and every condition instead of always...

  8. #8
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Being able to set the position to a floating point value is something I'm hoping Clickteam adds to MMF3... or perhaps MMF2, if they can. I know it can be done, but I don't know how hard it would be.

  9. #9
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh no, im so sorry Corlen, i must have been in too much of a hurry.
    Please disregard my last post.
    ...
    This is how it can be done ( see .mfa attachment "RisingWater" ).

    Water object has 3 values:
    - OriginalPositionY_
    - MoveY_
    - MovementSpeedY_

    The .mfa contains 2 conditions and 3 actions.
    Attached files Attached files

Similar Threads

  1. Move by Bézier object
    By Ross in forum Released Extensions
    Replies: 6
    Last Post: 10th February 2017, 02:37 PM
  2. Mouse Move / Finger Move (Touchscreen)
    By Spyhunter in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 20th December 2013, 04:00 PM
  3. Object order issue when rendering. (Move object in front of/behind...)
    By JayTholen in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 16th November 2012, 11:39 PM
  4. move object over time
    By TheOriginator in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 21st September 2011, 01:27 PM
  5. Move object from A to B.
    By Popcorn in forum File Archive
    Replies: 3
    Last Post: 20th September 2011, 02:27 AM

Posting Permissions

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