User Tag List

Results 1 to 6 of 6

Thread: Ratios and decimal points etc

  1. #1
    Clicker Android Export Module

    Join Date
    Feb 2010
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ratios and decimal points etc

    PROBLEM SOLVED!! THANKS GUYS@@@@@@@

    Hi.

    So basically I'm doing a hit accuracy for my game it works alright but here's the problem.

    For example: 678*100.0/1000=67.8

    This works, but it will also include the .8 - I don't want this to happen, I want 67% I hope you know where I'm coming from

    Thanks in advance

    PROBLEM SOLVED!! THANKS GUYS@@@@@@@

  2. #2
    Clicker Multimedia Fusion 2

    Join Date
    Jan 2007
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ratios and decimal points etc

    Pick a function, use whichever you think fits best.
    int(): converts to integer (rounds down)
    round(): rounds numbers to the nearest integer
    floor(): rounds numbers down
    ceil(): rounds numbers up

  3. #3
    Clicker Android Export Module

    Join Date
    Feb 2010
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ratios and decimal points etc

    Do you think you could go into more detail of how to do that, please?

    Thanks in advance

  4. #4
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Ratios and decimal points etc

    int(67.8) = 67
    round(67.8) = 68
    floor(67.8) = 67
    ceil(67.8) = 68

    it would be:
    int(678*100.0/1000)=67

  5. #5
    Clicker Android Export Module

    Join Date
    Feb 2010
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ratios and decimal points etc

    Could you go into more detail please? my current expression is.

    Str$(value( "hit" )*100.0/value( "fired" ))

    Thanks in advance

  6. #6
    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: Ratios and decimal points etc

    Replace 67.8 in his post with your frmula, and put the Str$ around it all.
    Working as fast as I can on Fusion 3

Similar Threads

  1. Resolution & Aspect Ratios
    By Asholay in forum XNA Export Module Version 2.0
    Replies: 6
    Last Post: 7th August 2012, 10:47 PM
  2. Resizing & Aspect Ratios
    By Bipolar_Games in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 12th October 2011, 03:30 AM
  3. Scalling (screen ratios related)
    By Realnoize in forum iOS Export Module Version 2.0
    Replies: 5
    Last Post: 15th August 2011, 06:26 AM
  4. Getting Action Points in LUA?
    By astrospoon in forum Lua Scripting
    Replies: 12
    Last Post: 15th October 2009, 10:16 PM
  5. counters and decimal points.
    By Clicktastic in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st July 2006, 01:37 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
  •