User Tag List

Results 1 to 5 of 5

Thread: Problem with 360 shooter

  1. #1
    No Products Registered

    Join Date
    Oct 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with 360 shooter

    Okey...Ive seen a lot of tutorials that use no extensions, all of them uses trigonometry, Im used to it, but I have a problem with the movement.

    Im doing a game in MMF2, I want to make a character viewed from the top to move in 360 directions, and I want it to spin clock and counter clock-wise and fire in all the 360º.
    I tryed making the movement like this:

    - On player1 up:
    SetX: X( "Player1" )+Cos(Angle( "Player1"))*3
    SetY: Y( "Player1" )-Sin(Angle( "Player1" ))*3
    - On player1 right
    Set Angle: Angle( "Jug1" )-10
    - On player1 left
    Set Angle: Angle( "Jug1" )+10

    It kinda works but I dont like it, for example when the player is in direction 1 it walks like it was on direction 0 and for some reason when I hold the up and right keys the player starts spining but not in a form of a circle but more kinda a serpentine (making circles but changing the centre).
    And I think there will be problems with firing more later.
    Do I need some extension?, how do I do 360º and not only 32?.

    Thanks

    EDIT: I wanted 360 dirs, not only 8, changed.

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with 360 shooter

    Seems to me like 10 is too much. Try changing it to 2.

    If it's not in the center, try moving the image's hotspot.

  3. #3
    No Products Registered

    Join Date
    Oct 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with 360 shooter

    yes well, it was too much, 4 is better, but the movement is still like a serpentine.
    And the worst problem is that there arent 360 directions to walk, there are a lot less, I want it to be more accurate.

    Is the problem that the decimals get lost?, must I save them in a variable?

  4. #4
    No Products Registered

    Join Date
    Jul 2006
    Location
    Sweden, Lund
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with 360 shooter

    Yes, you don't get the decimals when you manipulate the X and Y of the object directly.
    Use two alterable values to store and change the X and Y just as you described it above. Then have an always event that sets the object's X and Y to those alterable values.
    The alterable values will keep the decimals if you use the "Set" action (Add and Substract doesn't).
    Also you will need to set the alterable values to the X and Y of the object at the start of the frame, or it will be offset and starting at (0,0).

  5. #5
    No Products Registered

    Join Date
    Oct 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with 360 shooter

    Yes...that worked, thanks to all.

Similar Threads

  1. Shooter Aim problem
    By EdibleWare in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 31st October 2011, 02:40 PM
  2. Space shooter movement problem
    By TealHydra in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 26th June 2011, 05:56 AM
  3. 360 shooter problem
    By EdibleWare in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th January 2011, 06:40 PM
  4. 360 Shooter problem
    By EdibleWare in forum File Archive
    Replies: 0
    Last Post: 9th January 2011, 06:40 PM
  5. Problem MooClick Shooter
    By The_Warrior in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 7th November 2010, 05:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •