User Tag List

Results 1 to 5 of 5

Thread: Problems with moving platforms syncing their movement

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    75
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Problems with moving platforms syncing their movement

    Hi,

    I've run into a problem. Whenever a moving platform is spawned, it gets the same position in it's X movement as the previously created moving platform, this is a problem as it's not what I want to achieve.
    I would like the platforms to start at a defined start X position when spawned so that they can move non-synced.

    Also, there is a problem when two or more are spawned at the same time, only one of them seems to get the values I try to give them. This can easily be tested by making the spawners created at start and placing them instead of using space to create them.


    Anyone who knows what could/should be changed to achieve this?



    Moving Platforms.mfa

  2. #2
    Clicker Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jan 2015
    Location
    Australia
    Posts
    166
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Try this:
    Moving Platforms 22.mfa

    When each platform is created, the current timer is stored as a variable "TimeOffset". This is then subtracted when calculating the X position of the platform, meaning each moving platform's timer "starts" at a timer of 0

    As for multiple platform spawners only spawning one object, a foreach loop on each object will ensure the event is run across every one of them

  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    75
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Oh, thanks, that seems to work perfectly!

    Just curious though at the mechanics behind this. Why is it that a fooreach loop works when spawning objects and defining values at the same time and why isn't the values set correctly without the foreach loop?

  4. #4
    Clicker Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jan 2015
    Location
    Australia
    Posts
    166
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    When you use an event tied to a specific object, like checking the Flag of each Spawn object, the actions will fire differently based on where those actions are being performed

    - events tied specifically *to* those objects will fire for each of them. That is, "If Spawner Flag 0 is ON, then apply these actions to the Spawner". So actions like "Destroy the Spawner" will happen to every spawner with the flag turned on

    - events involving other objects will happen so long as the first condition remains true, but will only fire once per event loop. "If Spawner Flag 0 is ON, then create a object"

    the foreach loop allows you to fire actions, unrelated to the spawner object, for each individual spawner

    If you haven't read them already, this article on the object scoping is a good place to start, and this article has a lot of in depth information and examples

  5. #5
    Clicker Fusion 2.5 (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    75
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Thank you! I will read those articles!

Similar Threads

  1. Problems with moving platforms?
    By victor_fl in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 4th July 2014, 08:01 AM
  2. MMF2 / Problems With Moving Platforms
    By victor_fl in forum Fusion 2.5
    Replies: 0
    Last Post: 17th June 2014, 01:59 AM
  3. Moving platforms with Physics platform movement
    By Bloodreddawn in forum Fusion 2.5
    Replies: 3
    Last Post: 15th January 2014, 08:15 AM
  4. Moving platforms with PMO (Platform Movement Object)
    By Ahiru in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 19th February 2013, 12:57 AM
  5. Moving Platforms under Floating Point Movement?
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 10th February 2010, 06:18 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
  •