This documentation was adapted by community user Collin based on the original Chinese documentation for Arkos by the author.
Arkos Cocrea account: https://cocrea.world/@Arkos
More Sensing usage
The "More Sensing" extension provides cloud time, more convenient key press detection, and other features.
- Get Network Time You can retrieve the current cloud time with four options:
- Seconds: Get the number of seconds since 1970. This can be used as a seconds timestamp.
- Days Since 2000: This can be used as a days timestamp.
- Difference from Local Time: Get the discrepancy between cloud time and local time (in seconds). For example, -1.5 means the cloud time is 1.5 seconds slower than the local time. This can be used to determine if the local time has been tampered with.
- ISO Date: The format is like
2024-02-25T20:25:56.217+0800
, which can be used with the time calculation extension -6.
If the network is disconnected or the cloud time cannot be retrieved, it returns NaN. The retrieved cloud time has a 5-second cache; the latest value is read only after 5 seconds. Within 5 seconds, the corrected local time is calculated based on the difference between the cloud time and the local time.
- Time Unit Conversion For example, converting 60 seconds to minutes returns 1:
There are two special options with the following conversion effects:
- Login Detection Solves the inconvenience of detecting anonymous users.
- Get Number of Clones Retrieves the current number of clones (this block is also available in the Arkos extension, but it will be hidden in the future).
- Get Stage Width and Height Retrieves the width and height of the stage.
- Get All Sprites The result is a JSON list of sprites. There are many extensions that can handle this format, such as the Data Assistant extension.
- Collision Detection Between sprites Detects whether any two sprites are touching (the second sprite includes clones, while the first sprite only includes the original).
- Detect if sprite Touches a Point For example, used to detect if a point is on a map obstacle.
- Detect if sprite Touches a Rectangle (Seems to have limited application scenarios)
- Detect Coordinates When Point-to-Point Line Touches sprite The result is separated by commas. If there is no intersection, it returns empty. One use case is to detect if there are obstacles between a monster and a player.
- Detect Coordinates When Ray Hits sprite Can be used to simulate a laser, detecting the coordinates when it hits a wall.
- Detect if Self is Above a Certain Point Returns false if the sprite is blocked by other sprites, otherwise returns true.
- Detect sprite Click Both of the following methods can detect sprite clicks, but this extension block has two advantages over the original method:
- It only detects "clicks" on the sprite. If the mouse is held down and dragged from elsewhere onto the sprite, it won't be detected.
- Holding down the mouse won't trigger continuous detection; it only triggers once.
- It only detects clicks on sprites that are not obstructed. Blocked sprites won't trigger a "click."
- Key Press Detection
- Color Detection: The last two blocks are for color detection:
- The first block is used to get the color code. This block is also available in the Arkos extension, but it may be hidden in the future.
- The second block is used to get the color code at a specific point, which can be used for creating functions like scanners or color pickers.
If you have any questions or suggestions, you can find us in the discord server: https://discord.gg/U3nyveCvRa