|
comp = serverApi.CreateComponent(entityId, "Minecraft", "attr")
comp.SetAttrValue(GetMinecraftEnum().AttrType.DAMAGE, value)
comp.SetAttrMaxValue(GetMinecraftEnum().AttrType.DAMAG, value)
设置属性值服务端组件
当type为DAMAGE时 设置的不是单个生物的攻击属性,而是全部的 这种类型的生物的攻击属性
我是在设置猪人的攻击属性的时候发现的此bug,正常来说这个只会设置 entityId 这一个生物的属性 而不是它整个类型的 |
|