🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## 再生盔甲 ## 伤害功能 ### 创建伤害函数 点击进入`ThirdPersion Character`,创建伤害制造函数`Take Damage 5%`: ![sAlkrT.png](https://s3.ax1x.com/2021/01/05/sAlkrT.png) ### 创建蓝图Actor,命名为PainVolum 创建蓝图Actor,命名为PainVolum: ![sAl7o4.png](https://s3.ax1x.com/2021/01/05/sAl7o4.png) 添加组件 box collision,进入事件图表,选择事件Actor开始重叠, 创建bool变量`IsInVolume`来判断是否继续伤害, 蓝图如下: ![sA3PBT.png](https://s3.ax1x.com/2021/01/05/sA3PBT.png) 放一个Actor到楼梯上。然后运行起来, 走到楼梯上可以看到在掉护甲: ![sA3TPJ.png](https://s3.ax1x.com/2021/01/05/sA3TPJ.png)