User Tag List

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

Thread: Increase speed

  1. #1
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Increase speed

    Hi!
    I have an enemy I want to increase the speed with 5 every 30 sec. What is the best way to do that?

  2. #2
    Clicker Multimedia Fusion 2 Developer
    alspal's Avatar
    Join Date
    Nov 2007
    Location
    Australia
    Posts
    171
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Increase speed

    Use the timer object and do every 30 seconds then for the action, go to set speed for the object. Then type: Speed( "enemy" ) + 5

  3. #3
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,577
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Increase speed

    If you're creating and destroying enemies, you might want a slightly more robust approach:


    +Always
    =Set Speed of "Enemy" to 50 + seconds / 6

    or
    50 + int(seconds / 30) * 5

  4. #4
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Increase speed

    Thanks to both of you. I will try it later.

  5. #5
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Increase speed

    alspal's example works great, but when I destroy the enemy and it creates a new one, the speed is starting at the beginning.

    I tried Pixelthief's example too, but I can't get it working.
    Can you please give me a little more detailed?

  6. #6
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,577
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Increase speed

    whoops I made an error on that
    hah, I always mix that up


    I forgot, "seconds" returns only the seconds part of the timer, which keeps resetting from 0 to 59. Theres no built in function to return the # of seconds since the game started.


    Change it to say



    +Always
    =Set Speed to 50 + int(Timer / 30000) * 5



    Timer gives it in 1/1000 seconds (milliseconds) since the start of the frame. So 30000 millseconds = 30 seconds. The "Int()" function will round this down, so it will always jump up from 0 to 1 to 2 to 3, where if you didn't use int() it would take fractions like 1.24 and 3.45 seconds, and the speed would be moving up constantly instead of +5 every 30 seconds

  7. #7
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Increase speed

    Quote Originally Posted by Pixelthief
    whoops I made an error on that
    hah, I always mix that up


    I forgot, "seconds" returns only the seconds part of the timer, which keeps resetting from 0 to 59. Theres no built in function to return the # of seconds since the game started.


    Change it to say



    +Always
    =Set Speed to 50 + int(Timer / 30000) * 5



    Timer gives it in 1/1000 seconds (milliseconds) since the start of the frame. So 30000 millseconds = 30 seconds. The "Int()" function will round this down, so it will always jump up from 0 to 1 to 2 to 3, where if you didn't use int() it would take fractions like 1.24 and 3.45 seconds, and the speed would be moving up constantly instead of +5 every 30 seconds

    I must do something wrong, Because it doesn't seem to work. The enemy is moving the speed of 50. I change 50 with 12 and the enemy is moving slower, but the speed doesn't change with 5 every 30 sec.

  8. #8
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,577
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Increase speed

    Heres an example file:
    (using 10 base speed and +10 speed every 5 seconds)

    http://sites.google.com/site/claniraq/stuff/movementexample.mfa?attredirects=0&d=1

  9. #9
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Increase speed

    Thank you.

  10. #10
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Increase speed

    I have another question. After I have killed the last enemy, I want to create one more enemy. Example:

    In start of frame, I have 1 enemy. I kill it and 2 more enemies is appearing. I kill these two. 3 more enemies is appearing, etc, etc.

    I have tried with loops, but without luck. Can anyone help me?

    Thanks

Page 1 of 2 1 2 LastLast

Similar Threads

  1. How to increase animation speed in game
    By MonDieu72 in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 19th December 2013, 02:43 AM
  2. Does timer speed increase with the framerate?
    By MechatheSlag in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 7th April 2010, 08:34 PM
  3. Gradual speed increase help
    By TheWonkits in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 7th May 2009, 08:51 PM
  4. Gradual increase in speed of object
    By OldGuy in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 4th November 2008, 09:16 PM
  5. Speed Increase in next beta release? (please!?!)
    By Tuna in forum Hardware Accelerated Runtime
    Replies: 12
    Last Post: 5th October 2008, 08:38 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
  •