What's a real world use of this?

After being confused about this explanation thinking it was only used for delaying for an hour I understand that you can do different things to different abilities. Delay and Repeating are used by Sam but why would you want to do this? If I activate rage why would I wait x seconds or even repeat it twice? Is there any other examples that could be given?

Also with the delay example this feels like its limited scope, as you cannot alter the delay duration unless adding it to the constructor, what would mean that there would have to be a script managing each abilities delays what breaks the purpose. Alternatively if each ability had a delay duration this isn’t scalable as you would need variables for rage, repeat time etc.

In a more real world example of the Rage ability (Sam’s examples are quite abstract, as you’d likely construct these abilities with ScriptableObjects so you can set various parameters in the inspector, etc), in most games, if you invoke an ability like “Rage”, you likely will want to display an Animation leading up to that rage… perhaps Dr. Jeckel needs to drink a potion to become Mr. Hyde… so you drink the potion, and then as the potion gets drank, the Rage ability becomes manifest.

For this to work properly, we need a way to delay the Rage effect from occurring until the animation has reached the point that the rage effect should be instated. The Delay is one way (certainly not the only way) to accomplish this.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms