方法一:使用图形化触发器(适用于普通用户)
1. 创建触发器:
2. 设置触发器事件:
3. 选取并删除物品:
Item Group
Loop
Item
方法二:使用自定义脚本(覆盖整个地图)
如果物品可能位于不可游玩区域,需通过JASS脚本覆盖整个地图:
1. 在触发器中添加自定义脚本:
jass
Custom script: set bj_wantDestroyGroup = true
Custom script: call EnumItemsInRect(GetWorldBounds, null, function RemoveItem)
注意事项
完整脚本示例(自定义代码)
jass
// 触发器动作部分
Custom script: set bj_wantDestroyGroup = true
Custom script: call EnumItemsInRect(GetWorldBounds, null, function RemoveItem)
通过上述方法,可安全且高效地删除地图上的所有物品。