可复现的版本 Reproducible Version
AGMaker 1.0.12
问题描述 Problem Description
想实现的效果:
Desired effect:
A对象使用VS脚本创建状态连接,条件为:在B对象距离30像素以内时,转到InDistance状态,显示InDistance文字,并在InDistance状态下点击Enter键可以显示CheckInDistance文字。
而在B对象距离30像素以外时,转到OutDistance状态,显示OutDistance文字,并在OutDistance状态下点击Enter键可以显示CheckOutDistance文字。
Object A uses a VS script to create state connections. The condition is: when Object B is within 30 pixels, it transitions to the InDistance state, displays “InDistance” text, and in the InDistance state, pressing the Enter key displays “CheckInDistance” text. When Object B is beyond 30 pixels, it transitions to the OutDistance state, displays “OutDistance” text, and in the OutDistance state, pressing the Enter key displays “CheckOutDistance” text.
出现的问题:
Issue encountered:
无法正确识别距离。
Inability to correctly recognize distance.
如下图:
As shown in the figure below:
图中蓝色对象长度为60像素,中心点距离边缘都为30像素,绿色竖条对象以500像素每秒的速度用左右移动模板来回移动,但是无法正确实现绿色竖条对象在蓝色区域内才获得InDistance状态。
在蓝色区域前半段内按Enter键却显示OutDistance,出了蓝色区域一小段距离内按Enter键也会显示OutDistance。
In the figure, the blue object is 60 pixels long, with the center point 30 pixels from each edge. The green vertical bar object moves left and right at 500 pixels per second using a template, but it fails to correctly achieve the InDistance state when the green bar is within the blue area. Pressing Enter in the first half of the blue area displays OutDistance, and pressing Enter shortly after exiting the blue area also displays OutDistance.
复现步骤 Reproduction Steps
- 下载附件,解压F5运行
Download the attachment, extract it, and run it by pressing F5. - 竖条会左右移动,当它在蓝色区域内按Enter键进行检测,出了蓝色区域再次检测。(一次检测结束按Enter键会重新开始检测。)
The vertical bar will move left and right. Press Enter when it is within the blue area to perform detection, and press Enter again when it is outside the blue area. (Pressing Enter after one detection ends restarts the detection.) - 进入蓝色前半段左右按Enter键会出现OutDistance状态,在出了蓝色区域一段距离按Enter依然是InDistance状态。-----> BUG
Pressing Enter in the first half of the blue area results in the OutDistance state, and pressing Enter shortly after exiting the blue area still shows the InDistance state. ----> BUG
附件 Attachment
distancetest.zip (525.8 KB)