找回密码
 点一下
查看: 1496|回复: 8

[已解决]难道all unit are dead 这个功能是没用的?各位看一下!

[复制链接]
发表于 2007-4-4 20:55:19 | 显示全部楼层 |阅读模式
Event- A unit Dead

Actions
    Set Dead_pU = (Dying unit)
    Set y = (Player number of (Owner of Dead_pU))
    Custom script:   local group udg_TempGroup_Defeate_check
    Custom script:   set bj_wantDestroyGroup = false
    Set TempGroup_Defeate_check = (Units in Whole_Map owned by Players[y])
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            (All units of TempGroup_Defeate_check are dead) Equal to True
        Then - Actions
            Game - Display to (All players) the text: (player defeated           + (String(y)))
        Else - Actions
            Do nothing
    Custom script:   call DestroyGroup(udg_TempGroup_Defeate_check)


结果是游戏中就在任何单位死了以后都显示player defeated           。。。。。。。。

晕死了,大侠们指导一下~
发表于 2007-4-4 23:05:21 | 显示全部楼层
好吧,还素做演示吧,LZ的半TJ看得不素很明白,
特别素这句: Custom script:  set bj_wantDestroyGroup = false  ( 有虾米用? )

看图片吧,
失败.jpg


还不明白可以下载演示参考参考

单位死光就显示失败.w3x

18 KB, 下载次数: 17

回复

使用道具 举报

 楼主| 发表于 2007-4-4 23:26:19 | 显示全部楼层
如此说来。。。。你这样的set unit_group 不会引起内存泄漏?

试了一下, 不错嘿!挺流畅的!多谢指导!辛苦了!
[s:39]
回复

使用道具 举报

发表于 2007-4-4 23:38:02 | 显示全部楼层
其实unit_group这个东西没有删除的必要,因为需要反复使用,只需要把单位移除就OK鸟.
回复

使用道具 举报

 楼主| 发表于 2007-4-4 23:49:46 | 显示全部楼层
嗯!了解!

觉得你们好象都是搞编程的。。。。。
自己只是个业余的~
回复

使用道具 举报

发表于 2007-4-5 10:24:16 | 显示全部楼层
这个group是需要destroy的~~
回复

使用道具 举报

发表于 2007-4-5 11:26:00 | 显示全部楼层
为虾米要?
回复

使用道具 举报

发表于 2007-4-5 13:28:40 | 显示全部楼层
因为你选取一次。就会产生一个单位组。而不是把单位加到原来的单位组。
回复

使用道具 举报

发表于 2007-4-5 17:49:38 | 显示全部楼层
原来电脑素酱紫计算的.................
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-13 17:28 , Processed in 0.110877 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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