找回密码
 点一下
查看: 1544|回复: 6

[已解决]单位问题

[复制链接]
发表于 2008-8-1 16:48:46 | 显示全部楼层 |阅读模式
function d takes nothing returns nothing

这里怎么得到c里的“u”?
xxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxx
endfunction



function c takes nothing returns nothing
local unit u=GetSpellAbilityUnit()
local timer skillt=CreateTimer ()
call TimerStart( skillt, 0.01,true, function d )
call TriggerSleepAction( 0.50 )
call PauseTimer( skillt )
set skillt=null
set u=null
endfunction

还怎么发JASS 高亮啊?
发表于 2008-8-1 16:53:10 | 显示全部楼层
用gamecache+return bug

[codes=jass]
jass高亮
[/codes]
回复

使用道具 举报

 楼主| 发表于 2008-8-1 16:55:44 | 显示全部楼层
能给个范例么?
(初学不是很懂,好多东西,混在一起,头大大的)
回复

使用道具 举报

发表于 2008-8-1 17:01:04 | 显示全部楼层
[codes=jass]
function H2I takes handle h returns integer
  return h
  return 0
endfunction

function H2S takes handle h returns string
  return I2S(H2I(h))
endfunction

function GetUnit takes string pTable,string pKey returns unit
    return GetStoredInteger(udg_GC,pTable,pKey)
    return null
endfunction

function SetInteger takes string pTable,string pKey,integer pData returns nothing
    call StoreInteger(udg_GC,pTable,pKey,pData)
endfunction


function Flush takes string pTable returns nothing
    call FlushStoredMission(udg_GC,pTable)
endfunction

function CloseTimer takes timer t returns nothing
    call PauseTimer(t)
    call Flush(H2S(t))
    call DestroyTimer(t)
endfunction


function Revive_Timer takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local string s = H2S(t)
    call ReviveHero(GetUnit(s, "Hero"), GetRectCenterX(bj_mapInitialPlayableArea),GetRectCenterY(bj_mapInitialPlayableArea),true)
    call CloseTimer(t)
    set t = null
endfunction

function Revive takes unit u returns nothing   
    local timer t = CreateTimer()
    local string s = H2S(t)  

    call SetInteger(s,"Hero",H2I(u))
    call TimerStart(t, 10.0, false, function Revive_Timer)

    set t = null
endfunction
[/codes]


其实我是复制别出,现在不能开we
回复

使用道具 举报

 楼主| 发表于 2008-8-1 17:03:56 | 显示全部楼层
啊谢谢~~
我先琢磨一会儿~~不懂的话希望再帮助我一下哟~
回复

使用道具 举报

发表于 2008-8-1 17:21:54 | 显示全部楼层
缓存和returnbug就是为这个存在的
回复

使用道具 举报

 楼主| 发表于 2008-8-1 19:20:37 | 显示全部楼层
非常感谢~~终于成功了!
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-9 08:13 , Processed in 0.085197 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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