User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Locking the direction but not the movent

  1. #1
    No Products Registered

    Join Date
    Dec 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Locking the direction but not the movent

    So I'm making a sort of top down shooter kind of thing and what I am aiming to do is have a 'shot direction lock' where when you press an additional button to the fire button, it locks the direction you are shooting in (for example, top left) but lets the player move around as normal.

    How could I go about this? I'm fairly clueless.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Locking the direction but not the movent

    Two questions. Are you using an 8-Directions Movement for the player and how do you aim?

  3. #3
    No Products Registered

    Join Date
    Dec 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Locking the direction but not the movent

    Yes, eight directions and you shoot in the direction the player is facing.

  4. #4
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Locking the direction but not the movent

    use an 'Always-set direction to "X"' after toggling a flag when the button was pressed

  5. #5
    No Products Registered

    Join Date
    Dec 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Locking the direction but not the movent

    Sorry, do you think you could expand on that, as I still don't think I understand.

    How do I get MMF to lock the direction that the player is looking at, at the time of pressing the button.
    Also the shooting direction needs to stay the same whilst the button is pressed but the character still has to be able to move in the eight directions.

  6. #6
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Locking the direction but not the movent

    upon pressing button(
    ---set internal flag 0 on
    ---set alterable value A to dir(active)

    internal flag 0 = on
    ---set direction to alterable value A(active)

    active being your player

  7. #7
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export Module
    Chaos's Avatar
    Join Date
    Aug 2006
    Location
    Burnsville, MN, USA
    Posts
    806
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Locking the direction but not the movent

    an easier to understand method might be to have two active objects, a hidden one for moving, and a visible one for your actual player.

    Set up some events to say something like this:

    always --> set X position of (visible char) to X of (hidden mover), set Y position of (visible char) to Y of (hidden mover)

    X (negate) player is holding spacebar --> set direction of (visible char) to direction of (hidden mover)

    - you might need to set up another event to account for space bar actually being held, but that way, your main character can be used for the direction of the bullets, while the hidden moving active can be used for movement.

    I can try to set up an example file if you need it if I get some time, but its actually pretty simple.

  8. #8
    No Products Registered

    Join Date
    Apr 2008
    Location
    Miami, Florida
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Locking the direction but not the movent

    Here's an example based off of Chaos's method.

    http://files.filefront.com/lock+directionmfa/;10666199;/fileinfo.html

    I hope this helps.

  9. #9
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export Module
    Chaos's Avatar
    Join Date
    Aug 2006
    Location
    Burnsville, MN, USA
    Posts
    806
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Locking the direction but not the movent

    Thanks INH

  10. #10
    No Products Registered

    Join Date
    Apr 2008
    Location
    Miami, Florida
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Locking the direction but not the movent

    Glad to help.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Locking the Menus
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 10th January 2012, 01:59 AM
  2. Locking tool bars?
    By KLiK-iT in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 21st December 2011, 02:44 PM
  3. Site-locking?
    By Jacob_Miller in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 28th May 2011, 09:04 PM
  4. Locking the Desktop ?
    By Akuma in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 10th November 2009, 09:14 PM
  5. Locking the keyboard?
    By Bernardo3D in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 28th October 2009, 10:52 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
  •