User Tag List

Results 1 to 3 of 3

Thread: Put active in center of screen when out of frame.

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export Module
    Retrobolt's Avatar
    Join Date
    Mar 2016
    Posts
    402
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Put active in center of screen when out of frame.

    I have an active object that the player can move around, but if it gets moved off screen the player can't move it back.So I'd like to have it go to the center of the screen when it goes off screen.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,350
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    To answer your question:

    Set XPos of Active to X Left Frame +((X Right Frame - X Left Frame) / 2.0)
    Set YPos of Active to Y Top Frame +((Y Bottom Frame - Y Top Frame) / 2.0)

    In case this is a mouse movement or similar, you could limit the movement area of the movable object to inside the edges of the screen?

    Always set XPos of Active to Min(Max(X("Active"), X Left Frame), X Right Frame)
    Always set YPos of Active to Min(Max(Y("Active"), Y Top Frame), Y Bottom Frame)

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export Module
    Retrobolt's Avatar
    Join Date
    Mar 2016
    Posts
    402
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks!
    It works great.

Similar Threads

  1. saving the screen to an active animation frame
    By mobichan in forum Fusion 2.5
    Replies: 14
    Last Post: 24th April 2016, 02:18 PM
  2. Always center of the screen
    By Sparckman in forum Guides, Tutorials, Examples, Widgets
    Replies: 0
    Last Post: 7th June 2014, 06:18 PM
  3. BUG with center screen to an object
    By Sphax in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 30th April 2013, 02:36 PM
  4. main character is always the center of the screen
    By mnovoa in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 29th May 2012, 02:11 PM
  5. Center the screen
    By Rabagast in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th May 2009, 04:25 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
  •