User Tag List

Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 32

Thread: Direction and Angle calculator

  1. #21
    No Products Registered

    Join Date
    Jun 2006
    Location
    Denmark
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Direction and Angle calculator

    Try

    Angle <> LongDir( "Advanced Direction Object", X( "Active" ), Y( "Active" ), XMouse, YMouse )
    -> set angle to Rotate( "Advanced Direction Object", Angle of active, LongDir( "Advanced Direction Object", X( "Active" ), Y( "Active" ), XMouse, YMouse ), 3 )

    Then just replace the Xmouse and Ymouse with the position you want it to rotate to.

  2. #22
    No Products Registered

    Join Date
    Jun 2006
    Location
    Denmark
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Direction and Angle calculator

    Try

    Angle <> LongDir( "Advanced Direction Object", X( "Active" ), Y( "Active" ), XMouse, YMouse )
    -> set angle to Rotate( "Advanced Direction Object", Angle of active, LongDir( "Advanced Direction Object", X( "Active" ), Y( "Active" ), XMouse, YMouse ), 3 )

    Then just replace the Xmouse and Ymouse with the position you want it to rotate to.

  3. #23
    No Products Registered

    Join Date
    Jun 2006
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Direction and Angle calculator

    I don't understand that at all. Why are there 2 lines stuff and where do I put that in? Is it really that complicated?

  4. #24
    No Products Registered

    Join Date
    Jun 2006
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Direction and Angle calculator

    I don't understand that at all. Why are there 2 lines stuff and where do I put that in? Is it really that complicated?

  5. #25
    No Products Registered

    Join Date
    Jun 2006
    Location
    Denmark
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Direction and Angle calculator

    One of the lines are for the event, the other one is for the action. To make the event, go to "compare two general values" then enter

    Angle( "Active" )
    different
    LongDir( "Advanced Direction Object", X( "Active" ), Y( "Active" ), XMouse, YMouse )

    This condition compares the current angle of the active to the angle between the active, and the mouse. If they are different, then it means that the active isn't facing the correct angle, and it needs to be rotated. The action looks like this:

    set angle to Rotate( "Advanced Direction Object", Angle( "Active" ), LongDir( "Advanced Direction Object", X( "Active" ), Y( "Active" ), XMouse, YMouse ), 3 )

    The first part, Angle( "Active" ) gets the current angle. The second part, LongDir( "Advanced Direction Object", X( "Active" ), Y( "Active" ), XMouse, YMouse ) Gets the angle between the active and the mouse, and it's this angle the active is rotated to.

    The last part is just the speed of how fast it should be rotated.

    It's not really complicated, just a bit long.

  6. #26
    No Products Registered

    Join Date
    Jun 2006
    Location
    Denmark
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Direction and Angle calculator

    One of the lines are for the event, the other one is for the action. To make the event, go to "compare two general values" then enter

    Angle( "Active" )
    different
    LongDir( "Advanced Direction Object", X( "Active" ), Y( "Active" ), XMouse, YMouse )

    This condition compares the current angle of the active to the angle between the active, and the mouse. If they are different, then it means that the active isn't facing the correct angle, and it needs to be rotated. The action looks like this:

    set angle to Rotate( "Advanced Direction Object", Angle( "Active" ), LongDir( "Advanced Direction Object", X( "Active" ), Y( "Active" ), XMouse, YMouse ), 3 )

    The first part, Angle( "Active" ) gets the current angle. The second part, LongDir( "Advanced Direction Object", X( "Active" ), Y( "Active" ), XMouse, YMouse ) Gets the angle between the active and the mouse, and it's this angle the active is rotated to.

    The last part is just the speed of how fast it should be rotated.

    It's not really complicated, just a bit long.

  7. #27
    No Products Registered

    Join Date
    Jun 2006
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Direction and Angle calculator

    Ah ok but I don't want to use angles I just want to use the 32 directions, and it doesn't seem to work with that :/

  8. #28
    No Products Registered

    Join Date
    Jun 2006
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Direction and Angle calculator

    Ah ok but I don't want to use angles I just want to use the 32 directions, and it doesn't seem to work with that :/

  9. #29
    No Products Registered

    Join Date
    Jun 2006
    Location
    Denmark
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Direction and Angle calculator

    Under the Advanced directions setup box, just set the number of directions to 32, and replace all Angle( "Active" ) with Dir( "Active" ))

  10. #30
    No Products Registered

    Join Date
    Jun 2006
    Location
    Denmark
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Direction and Angle calculator

    Under the Advanced directions setup box, just set the number of directions to 32, and replace all Angle( "Active" ) with Dir( "Active" ))

Page 3 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

  1. angle calculator
    By rogiedodgie32 in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 7th February 2010, 02:57 AM
  2. Angle calculator in MMF2
    By teddyq in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 24th January 2009, 11:57 AM
  3. Angle Calculator for MMF2?
    By integrality in forum Extension Development
    Replies: 3
    Last Post: 11th December 2006, 05:36 PM
  4. THE PODUNKIAN'S ANGLE CALCULATOR
    By ThePodunkian in forum Extension Development
    Replies: 9
    Last Post: 24th August 2006, 04:32 AM
  5. Angle Calculator
    By willy in forum Extension Development
    Replies: 2
    Last Post: 13th August 2006, 06:02 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
  •