Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

GM8: Problem with mouse moved object!

Hi! I am working on a game in GAME MAKER 8 PRO. I tried to make an object moved with the mouse. I have an event which says

LEFT MOUSE BUTTON PRESSED: Move Free (direction 90 / UPWARDS)

This makes the OBJECT move UP only when pressing LEFT MOUSE on the object only(not globally!)

I then have another event saying this: LEFT MOUSE RELEASED : MOVE FREE (Direction: 270, down)

I have LEFT MOUSE BUTTON making the object move UP
Then when releasing LEFT MOUSE BUTTON, I have the OBJECT fall downwards again. Only when NOT pressing LEFT with the cursor over the object.

HERES A RECORD OF MY PROBLEM:

http://www.youtube.com/watch?v=5hZWipgy_5k

As you can see the OBJECT STILL moves any direction! I have to tap it or press it to make it go down again! Now that was NOT my idea, my idea was to make the OBJECT fall automatically when NO button is pressed (not globally) over the object! Please help, WHY does it continue moving? Am I using the wrong events?

NOTE: I want THE BOX to drop when mouse buttons IS NOT PRESSED OVER THE OBJECT, but it DOES NOT. I want it to move to LEFT when pressing LEFT MOUSE BUTTON (working) and UP when pressing RIGHT MOUSE BUTTON (working), and stop moving + DROP when NO BUTTON TOUCHED. At all. Right now nothing's working, but before I had to hover the mouse arrow over the object to make it drop again, simply not just releasing left/right arrow button (that I want). I have made a similar game in GM7 but GM8 doesn't seem to work in the same way.

COMMANDOS IN GM7:

OBJECT BOX: Left Mouse > Move 180 (LEFT)
Right Mouse > Move 90 (UP)
No Mouse Button > STOP MOVING + Move 270 (DOWN)


The difference is that it worked in GM7 WHEN I RELEASED any button, but in GM8, i need to steer curson OUT OF the object (BOX) and returning it over the BOX. Why is it like this? The release commandos doesn't work either! Thanks in advice:)

/9robin3
 
RadethDart":1n9idzff said:
If you need help with anything else, just make another post. I will try to make sure and check back at least once a day. :D

thanks its alright^^

But I can post a demo of the game. You'll se what I've done. It my very own strategy game.
 
Hmm, I can't believe how awesome that game is going to be! Great idea! I am really happy to see that my coding helped you out. :P I noticed that you changed up the code just a little bit to help accommodate what you were trying to achieve. Excellent choice on the music. :3
 
I get on occasionally. I am never at my computer for long periods of time now that I work on a computer all day at work. :P I have to give my eyes a rest sometimes, lol. I get on and check if you are online here and there.
 
RadethDart":14g4e4dt said:
I get on occasionally. I am never at my computer for long periods of time now that I work on a computer all day at work. :P I have to give my eyes a rest sometimes, lol. I get on and check if you are online here and there.

haha its cool^^ thansk for the help and hope you will enjoy the short demo!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top