User Tag List

Results 1 to 5 of 5

Thread: Moving a mouse controled object in a maze

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    DEKE15's Avatar
    Join Date
    Feb 2009
    Location
    UK
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Moving a mouse controled object in a maze

    Hi,

    I'm trying to create a maze game (like pacman),but the player can be controled by the mouse (so the player drags their sprite around the maze up, down, left and right).
    So far I have created 2 sections of the maze, a vertial path and a horizonal path, I can get the player to drag their sprite across the horizonal path and up and down the vertical. To do this I used the 'Drag Object' and limited the movement of the object 'X' when on the horizontal path and 'Y' on the vertical.
    This all works fine but the problem I have is when the paths/maze corridor intersect (like a cross roads). The player's sprite just locks to one path (the horizontal path or vertical).
    Is there an easy way to create a maze game (like pacman) where the player's sprite is controlled/dragged around by the mouse?
    Any tutorials or help etc would be greatly appreciated.

    Thanks.

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving a mouse controled object in a maze

    Hmm, maybe you could use the Path Finding object or the Advanced Path Finding object, and make it want to move towars the mouse's position. You could always make it go to the last step, but that would allow them to jump walls. Your game sounds cool but it would be extreamly hard to make it the way you want to.
    Working as fast as I can on Fusion 3

  3. #3
    No Products Registered

    Join Date
    Jan 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving a mouse controled object in a maze

    You could try your own events. For example:

    "Player" is overlapping "Horizontal Path" then set a variable to 1 or turn on an internal flag to represent this as a true statement. And then "Repeat while mouse-key is pressed" + "Variable A = 1" followed by "Set player "x-coordinate to x-coordinate of mouse". You may also need to test if the mouse pointer is over your Horizontal Path. This will be same with Vertical Paths.

    *And then create another path called "Intersection" for when the horizontal and vertical meet. Test for overlap and set both x and y to the mouse position.

    Hope this helps.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving a mouse controled object in a maze

    Hm if it wasn't dragging I'd say try using the ADO (Advanced Direction Object) and setting the number of directions to 4 (if that's even possible, I'm not sure how low it goes...)

    Either way, limit the player to four directions somehow, and set the direction of the player to the Direction("Advanced Direction Object", X("player"), Y("player"), XMouse, YMouse) and if its minimum is 8 directions, divide by 8 and multiply by eight:

    Direction("Advanced Direction Object", X("player"), Y("player"), XMouse, YMouse)/8*8

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    DEKE15's Avatar
    Join Date
    Feb 2009
    Location
    UK
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving a mouse controled object in a maze

    Thanks guys, I appreciate the comments.
    I will give these ideas a go.
    Thakyou, this problem has really got me stumped so any help is greatly appricated.

    Thanks :-)

Similar Threads

  1. Moving an object with the mouse
    By mag_news in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 4th May 2011, 11:52 PM
  2. Monitor mouse clicks while moving object with mous
    By rogiedodgie32 in forum The Games Factory 2 - Technical Support
    Replies: 5
    Last Post: 26th January 2010, 11:44 AM
  3. Moving around a maze
    By wetsuitgirl in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 25th February 2008, 01:15 PM
  4. Help moving a object with the mouse
    By Rick in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 6th May 2007, 01:54 PM
  5. Moving Object Along Path With Mouse
    By drnebula in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th January 2007, 01:24 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
  •