找回密码
 点一下
查看: 1189|回复: 3

怎么绑定特效?

[复制链接]
发表于 2008-12-5 15:10:39 | 显示全部楼层 |阅读模式
如何让计时器和特效之间进行绑定呢?=。=
发表于 2008-12-5 15:13:24 | 显示全部楼层
额………………用return bug+gamecache,将effect的handle值绑定在timer上啊
回复

使用道具 举报

发表于 2008-12-5 15:14:51 | 显示全部楼层
用区域变量记录...然后删除...想怎么搞怎么搞
回复

使用道具 举报

发表于 2008-12-5 20:19:28 | 显示全部楼层
[codes=jass]function H2I takes handle h returns integer
      return h
      return 0
endfunction

function I2U takes integer i returns unit
      return i
      return null
endfunction

function I2TX takes integer i returns effect
      return i
      return null
endfunction

function xuu takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local unit u = I2U(GetStoredInteger(GameCache(),I2S(H2I(t)),"TriggerUnit"))
    local effect tempEffect = I2TX(GetStoredInteger(GameCache(),I2S(H2I(t)),"Effect"))
    call DestroyEffect(tempEffect)
    call PauseTimer(t)
    call DestroyTimer(t)
    call FlushStoredMission(GameCache(),I2S(H2I(t)))
    set t = null
    set u = null
    set tempEffect = null
endfunction

function Trig_A014_Actions takes nothing returns nothing
    local timer t = CreateTimer()
    local unit u = GetTriggerUnit()
    local effect tempEffect = AddSpecialEffectTarget("Abilities\\\\Spells\\\\Undead\\\\UnholyFrenzy\\\\UnholyFrenzyTarget.mdl",u,"overhead")
    local real r = 5+5*GetUnitAbilityLevel(u,'A014')
    call StoreInteger(GameCache(),I2S(H2I(t)),"TriggerUnit",H2I(u))
    call StoreInteger(GameCache(),I2S(H2I(t)),"Effect",H2I(tempEffect))
    call TimerStart(t,r,false,function xuu)
    set t = null
    set u = null
    set tempEffect = null
endfunction[/codes]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-25 05:40 , Processed in 0.031093 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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