Promise Functions system
destroyed_all(the_set, snapshot=False)
Build a Promise that waits until all objects in the set are destroyed. Args: the_set (set[id]) snapshot (bool, optional): If True, the set checked will not change if the original set changes. Returns: TestPromise: The promise.
destroyed_any(the_set, snapshot=False)
Build a Promise that waits until any objects in the set are destroyed. Args: the_set (set[id]) snapshot (bool, optional): If True, the set checked will not change if the original set changes. Returns: TestPromise: The promise.
distance_greater(obj_or_id1, obj_or_id2, distance)
Build a Promise that waits until the distance between the two objects is greater than the specified value. Args: id1 (Agent | int): The agent or ID of the first space object. id2 (Agent | int): The agent or ID of the second space object. distance (int): The distance between the two objects. Returns: Promise: The promise
distance_less(obj_or_id1, obj_or_id2, distance)
Build a Promise that waits until the distance between the two objects is less than the specified value. Args: id1 (Agent | int): The agent or ID of the first space object. id2 (Agent | int): The agent or ID of the second space object. distance (int): The distance between the two objects. Returns: Promise: The promise
distance_point_greater(obj_or_id, point, distance)
Build a Promise that waits until the distance between the object and the point is less than the specified value. Args: obj_or_id (Agent | int): The agent or ID of the space object. point (Vec3): The point. distance (int): The distance between the object and the point. Returns: Promise: The promise
distance_point_less(obj_or_id, point, distance)
Build a Promise that waits until the distance between the object and the point is less than the specified value. Args: obj_or_id (int): The agent or ID of the space object. point (Vec3): The point. distance (int): The distance between the object and the point. Returns: Promise: The promise
grid_arrive_id(the_set, target_id, snapshot=False)
Build a Promise that waits until the grid object agents have completed their movement. Args: the_set (Agent | int | set[Agent | int]): The grid object or id or set to check target_id (int): The target grid object ID snapshot (bool, optional): If True, the set checked will not change if the original set changes.
grid_arrive_location(the_set, x=0, y=0, snapshot=False)
Build a Promise that waits until the grid object agents have completed their movement. Args: the_set (Agent | int | set[Agent | int]): The grid object or id or set to check x (int, optional): Not used y (int, optional): Not used snapshot (bool, optional): If True, the set checked will not change if the original set changes. Returns: TestPromise: The promise.