| |
Mouse_Moving, making mario follow the mouse
kremling |
|

Casual Member
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Drawing Comp Runner Up Badge (3) [*]](https://archive.mfgg.net/html/badges/dcr3.gif) ![Drawing Comp Top 5 Badge (4) [*]](https://archive.mfgg.net/html/badges/dct4.gif)

Group: Members
Posts: 923
Member No.: 3240
Joined: 28-January 07
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
I need help with my game..I need help with making mario follow my mouse cursor. Example.. ()----Mario *mouse_here------} moving_mouse ()-Mario_should_move ======================-Platform========== towards_the mouse... ()-Mario_should_also_keep_on_the_platform.. =======================================platfrom=== ===== {()-mario_facing_the_left___________()} mario_facing_the_right I want mario to change his directions to the mouse_directions aswell.. *-mouse {()-Mario_left____//mouse_moves\\___()} Mario_right *-mouse ================================================== If the mouse is underneath mario..I want it to still move mario, but does'nt make Mario go through the floor or somthing... Need real help for this..  So please help a fellow member out... Thanks everone.. (If you cant uderstand the pictures I made above, please tell me) -Krems-
--------------------
|
|
|
Golem |
|

Really short legs
![Minigame Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/mcg1.gif) ![Minigame Comp Runner Up Badge (1) [*]](https://archive.mfgg.net/html/badges/mcr1.gif) ![Minigame Comp Third Place Badge (3) [*]](https://archive.mfgg.net/html/badges/mct3.gif)

Group: Members
Posts: 930
Member No.: 1603
Joined: 4-November 05
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
Shanks - LOL, don't sweat it. Annoying me would be flooding my inbox with 20 messages before I had responded once. Kremling - This should work. It's is an edit of the engine Elite Charizard posted. I based it entirely off of what he posted, so I don't know how familiar you are with GML. However, if you're familiar with GML at all, you should be able to clear out a few noobish moves of mine. This is my first time really working with GML, I think I've looked up one or two lines of GML total in the past. Despite that, I think it does everything you want it to. Hope it helps! EDIT: Oh, and I left a few notes to myself in a random key press event for the Mario object. You might want to clear that out, too. This post has been edited by Golem on Mar 10 2007, 04:08 AM
Attached File ( Number of downloads: 20 )
mouse_move_v2.gm6
--------------------
Quoth the raven, "~teehee~"
|
|
|
Char |
|

fad was bad
![Moderator Badge [M]](https://archive.mfgg.net/html/badges/mod.gif) ![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Secret Santa Badge [*]](https://archive.mfgg.net/html/badges/present.gif)

Group: Admins
Posts: 2123
Member No.: 2856
Joined: 25-October 06
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
| QUOTE (Golem @ Mar 10 2007, 02:35 PM) | Shanks - LOL, don't sweat it. Annoying me would be flooding my inbox with 20 messages before I had responded once.
Kremling - This should work. It's is an edit of the engine Elite Charizard posted. I based it entirely off of what he posted, so I don't know how familiar you are with GML. However, if you're familiar with GML at all, you should be able to clear out a few noobish moves of mine. This is my first time really working with GML, I think I've looked up one or two lines of GML total in the past. Despite that, I think it does everything you want it to. Hope it helps! EDIT: Oh, and I left a few notes to myself in a random key press event for the Mario object. You might want to clear that out, too. |
Thanks for that. There is just one more glitch, that the sprite won't stop when it's in range with the mouse. But I found a method for that, expect it in a few minutes. Edit: Argh. This works on my 98, but on my XP, it does'nt. Maybe because the mouse movement is different in 98? (ie: It stops, not constantly moving left and right by a pixel) And Golem, fillers just take more space. You can use an ! before the function, eg: if variable != 0 or if !position_empty etc.
This post has been edited by Elite Charizard on Mar 10 2007, 05:54 AM
--------------------
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
[ Script Execution time: 0.0696 ] [ 14 queries used ] [ GZIP Enabled ] [ Server Load: 0.56 ]
| |