|
本帖最后由 稻草人009 于 2012-12-30 21:19 编辑
在下面输入自定义脚本代码. 该部分内容会被添加到地图脚本的变量声明和触发代码之间.
我是在这里面弄的,不知道有没有搞错地方
1.globals2.hashtable fuck = InitHashtable()
3.endglobals
1.function Trig_deathCondition takes nothing returns boolean
2. return ((IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true))
3.endfunction
4.
5.function death1 takes nothing returns nothing
6. local timer jishiqi = GetExpiredTimer()
7. local unit yingxiong = LoadUnitHandle( fuck, GetHandleId(jishjiqi), 0)
8. local location dian = LoadLocationHandle ( fuck, GetHandleId(jishiqi), 1)
9. local timerdialog chuangkou = LoadTimerDialogHandle( fuck, GetHandleId(jishiqi), 3)
10. call ReviveHeroLoc( yingxiong, dian, true)
11. call DestroyTimerDialog( chaungkou)
12. call DestroyTimer( jishiqi)
13. call RemoveLocation( dian)
14. set yingxiong = null
15. set dian = null
16. set chuangkou = null
17. set jishiqi = null
18.endfunction
19.
20.function Trig_deathActions takes nothing returns nothing
21. local unit yingxiong = GetDyingUnit()
22. local location dian = GetUnitLoc( yingxiong)
23. local timer jishiqi = CreateTimer()
24. local timerdialog chuangkou
25. call TimerStart( jishiqi, 10, false, function death1)
26. set chuangkou = GetLastCreatedTimerDialogBJ()
27. call SaveUnitHandle( fuck, GetHandleId(jishiqi), 0, yingxiong)
28. call SaveLocationHandle( fuck, GetHandleId(jishiqi), 1, dian)
29. call SaveTimerDialogHandle( fuck, GetHandleId(jishiqi), 3, chuangkou)
30. set yingxiong = null
31. set dian = null
32. set jishiqi = null
33. set chuangkou = null
34.endfunction
35.
36.//=======================================================
37.function InitTrig_death takes nothing returns nothing
38. local trigger death = CreateTrigger()
39. call TriggerRegisterAnyUnitEventBJ( death, EVENT_PLAYER_UNIT_DEATH)
40. call TriggerAddCondition( death, Condition(function Trig_deathCondition))
41. call TriggerAddAction( death, function Trig_deathActions)
42.endfunction
报错的行数是7、7、11、27,看了下错误的函数,估计错的地方不止这些,麻烦各位大大帮忙解决下,小弟不胜感激。
|
|