CustomEffect
You Can Create Custom Effect for Status
with this Actiontask
How to Use the CustomEffect
Class in Status+
CustomEffect
Class in Status+The CustomEffect
class in the MD.Status
namespace allows you to apply custom effects to a status by specifying its ID and name. You can also set the operation method, duration, and various other parameters. This guide is intended to help you understand how to use this class.
Prerequisites
Import Status+ into your Unity project.
Have NodeCanvas installed and be familiar with using Blackboards.
Class Parameters and Fields
Below is a list of important parameters and what they mean:
targetBlackboard: The Blackboard containing the status variables.
statusID: The ID of the status you want to affect.
statusName: The name of the status you want to affect.
value: The value to set or add to the status.
operation: Enum specifying the operation to perform on the existing value (
Set
orAdd
).perSecond: Whether to apply the change per second.
duration: The duration of the effect.
checkMinMax: Whether to check for minimum and maximum values for the status.
minValue: The minimum allowable value for the status.
maxValue: The maximum allowable value for the status.
Setting Up
Create a CustomEffect Task: Find the
CustomEffect
action task in the NodeCanvas tasks panel and add it to your flow.Configure the Blackboard: Assign the target blackboard containing your status variables to
targetBlackboard
.
Filling in Values
Set Status ID and Name: Enter the ID and name of the status you want to change in
statusID
andstatusName
.Value and Operation: Input the
value
to set or add and choose theoperation
(either Set or Add).Duration: Set how long the effect will last in
duration
.
Optional Settings
Per Second: Tick this if you want the value to be applied per second.
Min and Max: If
checkMinMax
is ticked, fill inminValue
andmaxValue
.
Running the Task
Once everything is set up, run your game. The CustomEffect
will execute and make the necessary changes to the status based on the parameters you've set.
Debugging
If things aren’t working as expected:
Make sure the
targetBlackboard
contains the status variables you specified.Verify that you entered the correct
statusID
andstatusName
.
Last updated