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.
@fairlyfairfighter Sorry, I probably wasn’t clear. I knew it worked as in ‘does this function effectively’. My concern was more, ‘will this be frowned upon by editors and others who monitor and set CoG’s style parameters’—in other words, is it an acceptable convention.
@Havenstone Not ideal as in ‘worth the time to go change the system to suit integer-only’…ah, thanks for clarifying. Not ideal as in ‘next time I make a timer I should plan better’, then? Very good. Thanks!
I mean I believe they’d prefer integers, and as a beta tester occasionally (nowhere near an extraordaniare, though ) integers would be slightly better, but I don’t think it’d make a massive difference, and probably not worthwhile to change if already done.
Good luck with your code/ game, and I hope it all goes to plan.