return the number after the decimal point ?!

POMPOM Member Posts: 2,599
edited November -1 in Working with GS (Mac)
hey guys im having a problem ..
i want to display the time of the play in the results page, and i want to use my own font
so i have digit actors and each is refer to a numeral of the time, HH/MM/SS
i try to extract the "seconds" and it dosent work.. lets say the time is 34.67 i need the " 7 "
what i did was:
change "self.digit" to (game.play_time*10)%floor( (game.play_time*10) )

the result should be 346.7%346 and return " 7 " to my tiny knowledge ,
but it doesent work.... any help?!

Comments

  • dmilinovichiiidmilinovichiii Member Posts: 620
    Set an actor to refresh an attribute (say time) to change the time attribute to the time played so far every 0.1 seconds. Then you just subtract the time attribute from the total time (say 0.07 seconds later like in your example) to get 0.07. Then when you use the 0.07 number, multiply it by 100 to get 7. Sorry if this isn't very clear. Could someone rephrase this for me?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Go to firemaplegames profile and download his time demo - it has EVERYTHING!!!!

    seriously
  • POMPOM Member Posts: 2,599
    wow firemaplegames time demo is amazing!!! it has everything i needed for the time display
    AND i learned a lot from it , thanke you firemaplegames!

    by the way in the demo there is the time display at the bottom of the scene, and the minutes
    --:0-:--

    is adding +1 to it for me every time , check it out , and thanks again!
Sign In or Register to comment.