游客:  注册 | 登录 | 搜索 | 帮助
3s地带



标题: WAR3改地图怎么显示伤害数值
zjcupic
狂风
Rank: 5Rank: 5Rank: 5



UID 12234
精华 0
积分 538
帖子 255
现金 528
贡献值 0
阅读权限 50
注册 2007-11-7
WAR3改地图怎么显示伤害数值
WAR3改地图怎么显示伤害数值?就是像RPG热血传奇一样的

顶部
kkkkkxu
狂风
Rank: 5Rank: 5Rank: 5



UID 12647
精华 0
积分 567
帖子 532
现金 557
贡献值 0
阅读权限 50
注册 2007-11-7
听不懂,你是要该呢还是怎么样啊。。。

  
顶部
hurrior
疾风
Rank: 4Rank: 4



UID 12449
精华 0
积分 267
帖子 231
现金 257
贡献值 0
阅读权限 40
注册 2007-11-7
好不容易找到答案了,不过是坏消息,需要用jass(相信你了解这个词)才可以,用t很复杂,而且会使地图很卡。


要用Jass滴,要用指定单位受到伤害事件


1. 把下面这段Copy到自定义代码区,再创建一个TempUnit变量
2. set udg_TempUnit = 需要显示伤害的单位
自定义代码:call ExecuteFunc("RunDamage")

红色部分为显示颜色,红+绿+蓝+Alpha通道

function ShowDamage takes nothing returns boolean
set bj_lastCreatedTextTag = CreateTextTag()
call SetTextTagText(bj_lastCreatedTextTag, I2S(R2I(GetEventDamage()))+"!", 0.023)
call SetTextTagPos(bj_lastCreatedTextTag, GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),50)
call SetTextTagColor(bj_lastCreatedTextTag, 157, 242, 249, 255)
call SetTextTagPermanent(bj_lastCreatedTextTag, false)
call SetTextTagVelocity(bj_lastCreatedTextTag, 0, TextTagSpeed2Velocity(50))
call SetTextTagLifespan(bj_lastCreatedTextTag, 1)
call SetTextTagFadepoint(bj_lastCreatedTextTag, 0.2)
return false
endfunction

function Damage takes unit u returns nothing
local trigger t=CreateTrigger()
local triggercondition c = TriggerAddCondition(t, Condition(function ShowDamage))
call TriggerRegisterUnitEvent(t, u, EVENT_UNIT_DAMAGED)
loop
exitwhen GetUnitState(u, UNIT_STATE_MAX_LIFE) <= 0
call TriggerSleepAction(60.00)
endloop
call TriggerRemoveCondition(t,c)
call DestroyTrigger(t)
set t = null
set c = null
set u = null
endfunction

function RunDamage takes nothing returns nothing
call Damage(udg_TempUnit)
endfunction

顶部


 
当前时区 GMT+8, 现在时间是 2009-1-10 05:49 清除 Cookies - 联系我们 - 3S地带 - Archiver - WAP - 赣ICP备07006302号
Powered by Discuz! 5.5.0  © Processed in 0.024660 second(s), 6 queries , Gzip enabled