In this tutorial, we’ll be using a button to apply a Behavior to the player character, and also using an Actor Event to apply a Mesh Effect.
This tutorial will cover:
Behaviors are a flexible tool that can allow you to modify a unit’s attributes. To create one, first go to the Data Window and make a new Behavior called “PowerUp SpeedBuff”.
Next we’ll want to:
This means that the behavior will last for 2 seconds and increase the move speed by 100%. Also there can only be 1 stack of the behavior at a time, but the duration will refresh if more are applied.
Let’s use the button we created in Tutorial 1-6 to apply the behavior.
To do so, we’ll first need to register the behavior with local speed_buff = DCEI.Behavior("Powerup SpeedBuff")
. Remember to put this in the variables section of your code.