User Tag List

Results 1 to 5 of 5

Thread: Mouse-over Object Events Problem

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2015
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Mouse-over Object Events Problem

    Hey everyone,

    In my game, when the player mouse-over an object, I want a static text to show a description of said object.

    (For example: when you mouse-over a tree it's going to say something like "This is a tree")

    So I created an Active object (the tree) and a Static Text object (the description) and made these events:

    -Mouse pointer is over (Tree):
    Set (Description) to "This is a tree"

    -X Mouse pointer is over (Tree):
    Set (Description) to ""

    The thing is, one of those events will keep looping, whether the cursor is on the tree ("This is a tree") or not (""), and I'm wondering if it would cause any performance issues and/or if there's any way to just set the description once and stop the loop.

    Thank you!

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I don't imagine there to be a noticeable performance drop. It would depend on how many of the objects you plan to have. Excess of 300 objects might show something. The performance drop would be unnoticeable in my opinion.

    Before you go ahead implements, consider doing it this way.


    + Always
    - Set Description to ""

    + Mouse over object 1
    - Set Description to "This is object 1"

    + Mouse over object 2
    - Set Description to "This is object 2"

    ...

    + Mouse over object N-1
    - Set Description to "This is object N-1"

    + Mouse over object N
    - Set Description to "This is object N"

    The Always statement acts like a default action. Having it first lets you cut down on the necessary actions.

    Instead of doing:
    + X Mouse over object 1
    + X mouse over object 2
    + X Mouse over object 3
    + etc...
    - Set Description to ""


    + Always
    - Set Description to ""

    does the same thing in a much simpler manner if it is before any other description event.

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2015
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much for your answer! It works just fine the way you told me to code it! And I'm glad there won't be a performance drop.

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2015
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It seemed to work very well at first but right now the description is flashing at times when it gets set to "This is object X", I believe it's due to the fact that it keeps refreshing to the same text. Is there a way to prevent the flashing or again, to just set it ONCE to "This is object X" and stop the looping until the mouse leaves the object?

    EDIT: Added attached file for better understanding of the situation; this is how It's coded for me right now.
    Mouse-Over Test.mfa

  5. #5
    Clicker Fusion 2.5Android Export ModuleSWF Export Module
    Ziplock's Avatar
    Join Date
    Oct 2013
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mouseover has been buggy in 2.5. I'd recommend a bug report.

    In the meantime, don't use direct actions for your mouseover conditions, rather, change some variables and have the results come from those variables.

    Instead of:

    if Mouseover X -> Do Y

    Use:

    if Mouseover X -> Change Value A to 1
    if Value A = 1 -> Do Y
    Attached files Attached files

Similar Threads

  1. Mouse controlled object problem
    By K_Tetsu in forum Fusion 2.5
    Replies: 2
    Last Post: 16th December 2014, 11:50 AM
  2. Object following mouse problem
    By Algul in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 3rd July 2009, 01:16 PM
  3. Mouse over active object problem
    By Sterling7 in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 29th June 2009, 01:27 AM
  4. Mouse click events runs faster when mouse moves
    By chrilley in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 2nd February 2007, 03:54 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
  •