Random Cooldowns
Posted: Wed Mar 11, 2015 12:48 am
Is there a way to randomize the length of a cooldown?
For example, under the code for defineObject { custommonster, code, etc, code }, there is:
Instead of a flat 3 cooldown, is there a way to make it randomize, say, 1 to 5? So when the monster moves, sometimes the cooldown will be noticeably quicker (1 or 2 seconds), other times a lot slower (4 or 5 seconds), or the standard 3, depending on how the dice rolls.
For example, under the code for defineObject { custommonster, code, etc, code }, there is:
Code: Select all
class = "MonsterMove",
name = "move",
sound = "rat_swarm_walk",
cooldown = 3,