|#port, on move bullet, needs, @move bullet, reads, @bullet index| |#port body, on move bullet, lua| local dt = state.dt local bullet = state.bullets[bullet_index] bullet.x = bullet.x + math.cos(bullet.angle) * 350 * dt bullet.y = bullet.y + math.sin(bullet.angle) * 350 * dt |#port, on is bullet fronze, needs, @is bullet frozen, reads, @bullet index| @bullet is frozen |#port body, on is bullet frozen, lua| counters["bullet is frozen"] = state.bullets[bullet_index].frozen and 1 or 0 |#port, on is bullet out of bounds , needs, @is bullet out of bounds , reads, @bullet index| @bullet is out of bounds |#port body, on is bullet out of bounds, lua| local bullet = state.bullets[bullet_index] local in_bounds = -10 <= bullet.x and bullet.x <= 810 and -10 <= bullet.y and bullet.y <= 610 counters["@bullet is out of bounds"] = in_bounds and 1 or 0 |#port, on mark bullet for deletion , needs, @mark bullet for deletion , reads, @bullet index| |#port body, on mark bullet for deletion, lua| local bullet = state.bullets[bullet_index] bullet.deleted = true