Is it acceptable to use a decimal value in coding, or is that generally frowned upon? I’m looking at a looped event with a timer. I’ve already coded several branches, and now I have a section where I want the events to count for half as much time. Rather than descending into coding convolutions, or going back and adjusting all the other values, am I all right to do something like:
*label pets_time *choice #Play with the puppy. *set timer + 0.5 He's so adorable! *goto pets_time #Pet the kittens. *set timer + 0.5 There are six kittens, and they mob you for attention. The black one rolls over on her back, little paws waving in the air. *goto pets_time #Be spastic with the ferret. *set timer + 0.5 The ferret runs round and round in circles, over and over, sending a spray of wood shavings into the air. *goto pets_time #Talk to the myna bird. *set timer + 0.5 "Polly want a cracker?" "My name is Elisheva! My name is Elisheva!" the bird caws back at you. *goto pets_time #Move on. *if (timer > 6) *goto on_with_the_show *else *goto main_choice_tree
Will that work, or are decimals generally not done? I should mention, it’s for the piece I hope to enter in the CoG contest.