Skip to content

Instantly share code, notes, and snippets.

@LionGet
Last active October 20, 2023 08:09
Show Gist options
  • Save LionGet/9b6b7a25d4915bc2875bba50176c3bbe to your computer and use it in GitHub Desktop.
Save LionGet/9b6b7a25d4915bc2875bba50176c3bbe to your computer and use it in GitHub Desktop.
Boiler Plate animations for spell/ability activations
# ANIMATION DEVICE
animation_device := class(creative_device):
# EDITABLES
# Notes: Index0 = InitTransition | Index1 = ChargeUp | Index2 = CastComplete
@editable VFXarray : []creative_prop_asset = array{}
@editable SFXarray : []audio_player_device = array{}
# EVENTS
CancelEvent : event() = event(){}
# VARIABLES
var InitTransitionVFX : ?creative_prop_asset = false
var InitTransitionSFX : ?audio_player_device = false
var ChargeUpVFX : ?creative_prop_asset = false
var ChargeUpSFX : ?audio_player_device = false
var CastCompleteVFX : ?creative_prop_asset = false
var CastCompleteSFX : ?audio_player_device = false
# ONBEGIN
OnBegin<override>()<suspends>:void=
InitAnimations()
InitAnimations():void=
set InitTransitionVFX = option{VFXarray[0]}
set InitTransitionSFX = option{SFXarray[0]}
set ChargeUpVFX = option{VFXarray[1]}
set ChargeUpSFX = option{SFXarray[1]}
set CastCompleteVFX = option{VFXarray[2]}
set CastCompleteSFX = option{SFXarray[2]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment