User Tag List

Results 1 to 3 of 3

Thread: Decimal problem (minimap)

  1. #1
    No Products Registered

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

    Decimal problem (minimap)

    I try to make a minimap with these events:

    Player point in the map:

    X( "Player" )/Frame Width * (Minimap Width)
    Y( "Player" )/Frame Height * (Minimap Height)

    It doesn't work because X( "Player" )/Frame Width brings 0. Why? Where are the decimals?

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: Decimal problem (minimap)

    These values are integer values, there are no decimals. You should do :

    (X( "Player" ) * (Minimap Width))/Frame Width
    (Y( "Player" ) * (Minimap Height))/Frame Height

    If you want to use floating point values, do something like :

    (X( "Player" ) * 1.0 )/Frame Width * (Minimap Width)
    (Y( "Player" ) * 1.0 )/Frame Height * (Minimap Height)

    But the first expressions are more efficient.

  3. #3
    No Products Registered

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

    Re: Decimal problem (minimap)

    Thanks a lot!

Similar Threads

  1. Decimal point on counters problem
    By Ryan in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 12th April 2012, 09:25 AM
  2. rounding decimal problem
    By arfa in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 6th December 2010, 02:14 PM
  3. I have a problem with decimal numbers
    By daniele in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 9th February 2009, 11:35 PM
  4. Decimal/rounding problem.
    By The_Alee in forum File Archive
    Replies: 8
    Last Post: 18th November 2007, 09:44 PM
  5. Fastest way to make a minimap/Minimap object?
    By The_Alee in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 22nd July 2006, 11:22 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
  •