i need some help with constraining a self image to a number.
hi all, i have a game.attribute "coins" so i have a actor that display this amount, so i have it with
constrain self.image to floor((game.coins%divider)/(divider/10))..".png" so i only want to display 3 digits so i have 3 actors, everything works good like if my coins values is 5, my actors images are 005, but i want to display negative numbers to, so if my coins are=-5 why my actors are not 005 instead of 995, if my values is negative i just want to display a image with a negative sign so it looks like this -005,thanks
constrain self.image to floor((game.coins%divider)/(divider/10))..".png" so i only want to display 3 digits so i have 3 actors, everything works good like if my coins values is 5, my actors images are 005, but i want to display negative numbers to, so if my coins are=-5 why my actors are not 005 instead of 995, if my values is negative i just want to display a image with a negative sign so it looks like this -005,thanks
Comments
@guilleface
Hi, off the top of my head, but should work OK:
When coins > 0 ...........or > -1 if you like
constrain self.image to floor((game.coins%divider)/(divider/10))..".png"
Otherwise
Change Attribute self.image to NegImage
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps