找回密码
 点一下
查看: 950|回复: 7

伤害显示排泄问题

[复制链接]
发表于 2009-2-17 19:05:11 | 显示全部楼层 |阅读模式
NewTrigger 001
事件
单位 - 任意单位进入 (完整地图区域)
条件
动作
触发器 - 为 NewTrigger 002 <预设> 添加事件: (单位 - (进入的单位) 接受伤害)
NewTrigger 002
事件
条件
动作
漂浮文字 - 创建漂浮文字: (转换 (单位所受伤害) 为字符串) 在 (触发单位)的头顶, Z轴偏移 0.00,字体大小: 10.00 ,颜色值:(100.00%, 100.00%, 100.00%) ,透明度: 0.00%
漂浮文字 - 设置 (最后创建的漂浮文字) : 禁用 永久显示.
漂浮文字 - 设置 (最后创建的漂浮文字) 的已存在时间为 5.00 秒
请问这样做会泄露吗?
发表于 2009-2-17 19:09:56 | 显示全部楼层
漂浮文字的生命周期
回复

使用道具 举报

发表于 2009-2-17 19:10:49 | 显示全部楼层
虽然我写的
但是我不知道
创建漂浮文字在单位头顶不会泄露点
不知道漂浮文字会不会泄露
回复

使用道具 举报

发表于 2009-2-17 19:30:10 | 显示全部楼层
漂浮文字没有删除 也没有生命周期 应该会泄露吧
回复

使用道具 举报

 楼主| 发表于 2009-2-17 19:30:45 | 显示全部楼层
设置生命周期就没事了吗?
回复

使用道具 举报

发表于 2009-2-17 19:38:10 | 显示全部楼层
至少漂浮文字自身应该没泄露了
回复

使用道具 举报

发表于 2009-2-17 20:19:39 | 显示全部楼层
当时写错
应该是设置显示时间
上一个动作
回复

使用道具 举报

发表于 2009-2-17 20:40:58 | 显示全部楼层
。。。。。。疯人的触发呐、、。。。、。、
创建漂浮文字在头顶
function SetTextTagTextBJ takes texttag tt, string s, real size returns nothing
    local real textHeight = TextTagSize2Height(size)

    call SetTextTagText(tt, s, textHeight)
endfunction
function SetTextTagPosUnitBJ takes texttag tt, unit whichUnit, real zOffset returns nothing
    call SetTextTagPosUnit(tt, whichUnit, zOffset)
endfunction
function SetTextTagColorBJ takes texttag tt, real red, real green, real blue, real transparency returns nothing
    call SetTextTagColor(tt, PercentTo255(red), PercentTo255(green), PercentTo255(blue), PercentTo255(100.0-transparency))
endfunction
function CreateTextTagUnitBJ takes string s, unit whichUnit, real zOffset, real size, real red, real green, real blue, real transparency returns texttag
    set bj_lastCreatedTextTag = CreateTextTag()
    call SetTextTagTextBJ(bj_lastCreatedTextTag, s, size)
    call SetTextTagPosUnitBJ(bj_lastCreatedTextTag, whichUnit, zOffset)
    call SetTextTagColorBJ(bj_lastCreatedTextTag, red, green, blue, transparency)

    return bj_lastCreatedTextTag
endfunction

在BJ内部泄露不少
用SetTextTagPos这个肯定没问题
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-7-21 16:22 , Processed in 0.103375 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表