mapeditor/tiled
Do you want to work on this issue?
You can request for a bounty in order to promote it!
No way to set a float prop to 0.0 in tiled extension #3423
fmoo posted onGitHub
Describe the bug Tiled extensions are unable to set map, layer properties to a float value of 0.0.
To Reproduce Steps to reproduce the behavior:
- use the following JS in a tiled extension:
tiled.assetOpened.connect((asset) => { if (asset.isTileMap) { asset.setProperty("autoscrollX", 1.0); asset.setProperty("autoscrollX", 0.0); } });
- open a map.
Expected behavior The map contains an "autoscrollX" property set to 0.0 (a float). Level designer can easily set the property to 0.1 or 0.3 without any additional steps.
Actual behavior The map contains an "autoscrollX" property set to 0 (an integer). Level designer must right click and "convert to float" before they can use this property with decimal values.
Media N/A
Specifications:
- OS: Windows 11
- Tiled Version: 1.9.0