Video Tutorial
1、Enable the PowerfulEffect plugin in your project.
2、Create an Actor blueprint that integrates GBWEffectActorBase as shown in the following figure. This tutorial names it "GBWEffect_Test".
3、Open the "GBWEffect_Test" blueprint and control the specific implementation logic of the Effect by implementing the three events OnEffectStart, OnEffectUpdate, and OnEffectEnd shown in the following figure.
You can control the different execution logic of the Effect at different locations on the network by judging the OwnerNetType.
4、Add a blueprint node as shown in the following figure, which will generate a Niagara effect at the position of the OwnerActor during the execution of the effect. In order to specify the generated Niagara effect assets, we will create a custom Struct as a parameter for the execution of the effect in the next step.
5、Create a Struct as shown in the following figure. In this tutorial, name it 'S_Param_Test'.
6、Open 'S_Param_Test' and add a 'NiagaraSystem' attribute named 'NiagaraToSpawn' to it, which specifies the Niagara assets that our Effect wants to generate. Additionally, add a 'String' attribute called 'SomethingToTest' for us to perform some simple tests.
7、Add an "ExecuteEffectPro" node to your character blueprint as shown in the figure below, and select "GBWEffect_Test" at the "EffectClass" pin. (Note that if you are not using this node in the character blueprint, you should manually specify the Actor object reference that produces the effect for the "InActor" pin.).
Add the 'Make S_Param_Test' blueprint node, set valid values for its attributes, and finally connect it to the 'Effect Struct Param' pin.
8、Return to the "GBWEffect_Test" blueprint.
Add an attribute variable of type 'S_Param_Test' to the blueprint and name it 'EffectParamter' in this tutorial.
Use the "InitEffectParameters" node to assign the parameters we passed in when we called Effect in step 7 to the "EffectParameter" variable.
Use the 'EffectParamter' variable to control the execution logic of the Effect.
9、Note that after the Effect is executed, you need to manually call "EndEffect" to destroy the Effect Actor to save memory during game runtime.
In this tutorial, we EndEffect after Niagara effect finished.
10、In the "OnEffectEnd" event, we print something to observe when the effect ended.
11、As shown in the following figure, we test the specific execution effect of Effect in multiplayer game mode.
12、Run the game, press the E key in any game window, and our Effect will execute normally.