Mouse click w/mouse controlled objects??...

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Playing around with a simple bat & ball game, the bat is mouse controlled...

    It appears that once you mouse control an object, there are no "global" mouse events say like in GameMaker so I had to use the spacebar to start the ball motion instead of the mouse click that I wanted.

    Or do I have to specify the bat as static and perhaps "force" the bat to follow the mouse X position within the game loop (I'd prefer to keep it simple for now since this is a question I'm asking for my wife who is just learning MMF2)

    Is there a way to receive a mouse click (so I can start the ball motion that way) while an object is controlled by the mouse?

    -Will

  • Wow, that sounded great but we looked at the Player object (the mouse controlled one) and the Player 1 object (the Joystick looking object)

    The only object that had "Fire Button 1" was for the Joystick (Player 1) and clicking the Fire 1 button in the config dialog still didn't start the ball as hoped.

    This is using Multimedia Fusion 2?

    I'll continue looking but we didn't see any fire button 1 item under the mouse controlled object...

    -Will

  • I suppose it is the same for mmf2 as for mmf1.

    The fire button1 under the joystick icon is actually the left mouse button, it's the same thing. But only when there are an object that use the mouse control, as in your application.

    So when you say: When user press fire button1, the action will be ran when you click the mouse.

  • Okay I believe you, but when I select the joystick object, and check the Fire Button #1 (note, I'm not sure what to do with the 8-position dial, it's set to "Up") and then run the app, clicking the mouse buttons still doesn't start the ball as does the spacebar...

    This is using the ChocoBreak tutorial and changing the spinning man to a mouse controlled object.

    Goodness, this should not be so hard, and why SHOULD one lose mouse msgs just because an object is controlled??

    Perhaps I'd like to use my mouse buttons (as I am now) for other things...

    -Will

    PS - Thanks for all your help btw, this is just a be confusing and frustrating, your answer seems simple enough but I'm not finding it to work as you're claming

  • Ok, till someone have the answer (I don't have mmf2 yet), you can do this:

    Get rid of the mouse movement, set it to static instead.

    Then have this event:

    * Always:
    + Set xpos of object to Xmouse
    + Set ypos of object to Ymouse

    Now your object is mousecontrolled, and the normal mouseactions shall work.

  • Yes, that was my fallback plan but I didn't want my wife to have to learn that low level kinda control yet; trying to keep the mix simple (as it should be) for now...

    Turns out, your answer WAS CORRECT. What threw me off was that 8-position direction control.

    Clicking off the single arrow (which II guess is expecting that particular direction from the joystick) got the ball to start as you originally suggested.

    Boy the help file talks in circles about that option! But anyway, thanks for all your help, we're up and running as we'd like now!

    -Will

    PS - And I have games that use both the mouse and joystick so cross-circuiting the buttons like this will certainly cause problems if one wanted to implement the same kinda controls (mouse & joystick) - I hope Click Team makes some changes here for their next revision...

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!