UE4 C++ GameplayAbilitiesを勉強していくPart.3-4 GameplayEffect Expiration

やあ

今回は、GameplayEffectExpirationについて勉強するよ。

間違いなどあれば教えてくださると助かります!

前回

pto8913.hatenablog.com

Expirationについて

f:id:pto8913:20200531004145p:plain
Duration PolicyHas Durationのときだけ。
GameplayEffectが終了したときに適用されるGameplayEffect

Premature Expiration Effect Classes

GameplayEffectが強制終了したり、タグが消されて実行できなくなったりしたときに適用される

Routine Expiration Effect Class

持続時間が終了したときに適用されるGameplayEffect

実際にExpirationを使ってみる(Premature Expiration Effect Classes)

今回は、4キーを押したら、
10秒間1秒ごとにスタミナが1減って、
5キ―を押したら、
GE_RefreshStaminaが適用されるようにするよ。
GE_RefreshStaminaはPart.2で作ったやつです

GameplayEffectの作成

f:id:pto8913:20200531153456p:plain
f:id:pto8913:20200531153919p:plain

GameplayEffectを適用できるようにする

f:id:pto8913:20200531154047p:plain

テスト

f:id:pto8913:20200531154309g:plain

うまくいってる。

実際にExpirationを使ってみる(Routine Expiration Effect Class)

今回は、6キーを押したら、
2秒間1秒ごとにスタミナが10減って、
2秒経ったら、GE_DFSDebuffが適用されるようにするよ。
GE_DFSDebuffはPart.3-1で作ったやつだよ

GameplayEffectの作成

f:id:pto8913:20200531155739p:plain
f:id:pto8913:20200531155701p:plain

GameplayEffectを適用できるようにする

f:id:pto8913:20200531155139p:plain

テスト

f:id:pto8913:20200531155826g:plain
ちょっとわかりづらいけど、できてるね。

今回はここまで、ありがとうございました。

次回

GrantedAbilitiesについて勉強するよ。

pto8913.hatenablog.com