跳转到内容

数组:修订间差异

修正
(大更改,需要修正)
标签移动版编辑 移动版网页编辑 可视化编辑
(修正)
标签移动版编辑 移动版网页编辑 可视化编辑
第61行: 第61行:
警告:截止1.15版,跨单位数组引用在下标中包含逻辑时。由于游戏bug,单位参考将被重定向。
警告:截止1.15版,跨单位数组引用在下标中包含逻辑时。由于游戏bug,单位参考将被重定向。


如:
{{折叠|例子|<pre>
代码:
customTarget1.readUnitMemory("obj",type="unit[]").get(memory.index)


customTarget1.readUnitMemory("obj",type="unit").get(memory.index)
customTarget1.readUnitMemory("obj",type="unit[]").get(self.hp)
 
customTarget1.readUnitMemory("obj",type="unit").get(self.hp)
 
customTarget1.readUnitMemory("obj",type="unit").get(memory.unit.readUnitMemory("index",type="float"))
 
实现运行(伪代码)


customTarget1.readUnitMemory("obj",type="unit[]").get(memory.unit.readUnitMemory("index",type="float"))
实际运行结果:(伪代码)
customTarget1.memory.obj.get(customTarget1.memory.index)
customTarget1.memory.obj.get(customTarget1.memory.index)


第76行: 第74行:


customTarget1.memory.obj.get(customTarget1.memory.unit.memory.index)
customTarget1.memory.obj.get(customTarget1.memory.unit.memory.index)
 
</pre>}}
index/thisIndex方法不受此影响。
index/thisIndex方法不受此影响。


可用的方案:
可用的方案:


1.复制数组
{{折叠|复制数组|<pre>
[hiddenAction_copy]


alsoTriggerAction:set
alsoTriggerActionRepeaty:customTarget1.readUnitMemory("obj",type="unit[]").size
alsoTriggerOrQueueActionWithTarget:customTarget1
[hiddenAction_set]
setUnitMemory:buffer[index]=thisActionTarget.readUnitMemory("obj",type="unit[]").get(index)
</pre>}}
2.修改内存单位数据
2.修改内存单位数据


clipboard.zip已使用改方案作为内核
clipboard.zip已使用改方案作为内核


下载链接:
[https://cra.lanzouj.com/b0agtlmih] 密码00


3.三重定向到自己的内存,需要内存单位持有自己。
3.三重定向到自己的内存,需要内存单位持有自己。
292

个编辑