Question about FMG:s custom fonts demo... animations?

StrobanikStrobanik Member Posts: 77
edited November -1 in Tech Support

Maybe I'm just daft but I can't seem to figure out how to use animations instead of png:s with Firemaplegames custom font demo.... In the infotext it says that you can easily use animations.. but I can't see how?

Mr Fire Maple? Anybody else?



  • firemaplegamesfiremaplegames Member Posts: 3,206
    Ah yes...I changed the demo to just use images.

    To use animations, you must do this:

    In the score glyphs actor, create a new Integer Attribute called 'myDigit' (without quotes).

    Change the Constrain Attribute that is there to this:

    Constrain Attribute
    self.myDigit To: floor(( game.currentScore % self.divisor )/( self.divisor /10))

    And then 10 Rules, like this:

    When all conditions are valid
    self.MyDigit = 0
    -----Animate [your zero sequence]

    When all conditions are valid
    self.MyDigit = 1
    -----Animate [your one sequence]


    However, this technique is very processor intensive!!! You must test it on an older devices!!!

    Actually , a better way would be something like this:

    A global boolean attribute called something like 'pleaseUpdateScoreNow'

    And instead of the constrain, use a Rule like this:

    when all conditions are valid:
    game.pleaseUpdateScoreNow = true
    -----Change Attribute: game.pleaseUpdateScoreNow To: false
    -----Change Attribute: self.myDigit To: floor(( game.currentScore % self.divisor )/( self.divisor /10))

    Then, whenever something affects the score, change game.pleaseUpdateScoreNow to true.
  • StrobanikStrobanik Member Posts: 77
    Cool, thanks for the fast answer. I'm trying to find an easy way to randomize an actors appearance between a lot of different animations. The "name"..blabla..".png" is so damn convenient, and I just hoped there was a beautiful solution with animations too. But I guess I'll just do a lot of rules and randomize an integer, as you suggest.

Sign In or Register to comment.