Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Waypoint-Queue
   
Award
Favorite
Favorited
Unfavorite
Vehicles: Creative
Tags: v0.9.31
File Size
Posted
Updated
32.905 KB
17 Jan, 2019 @ 6:21am
30 Jan, 2020 @ 6:59am
4 Change Notes ( view )

Subscribe to download
Waypoint-Queue

Description
If you want the autopilot to follow a route of several waypoints, this is the controller for you. Just add waypoints (from a large keypad) and they will be fed to your autopilot - one after the other. It's a queue, so the first waypoint you put in is the first which will be pulled out. It's even possible to add more waypoints to the queue when the autopilot pulled some out.

This could be usefull:
- the composite output shows the first 15 waypoints but the controller handles more.
- The Waypoint Controller can calculate additional data to the first waypoint of the queue.
- The Total Distance ist the distance between the first waypoint, following the legs to the last waypoint.
- The controller shows you the total amount of stored waypoints. If this reaches zero, you could automatically turn off the autopilot.
- Link the Pulse of the Large Keypad to automatically add the waypoint to the queue.
- Composite output #31 is the amount of waypoints
- Composite output #32 is the total distance between the waypoints

Controller size: 5x2

Inputs:
- Waypoint X, Waypoint Y (number) - The waypoint coordinatess which will be stored when "Push" is aktivated.
- Push (on/off) - The Waypoint will be stored to the queue
- Pop (on/off) - The first Waypoint from queue will be deleted and the next will be shown at the Waypoint output.
- Reset - Clears the queue

Outputs:
- Waypoint X, Waypoint Y (number) - The coordinates of the first waypoint in the queue
- Waypoints Quantity (number) - The amount of stored waypoints
- Total Distance (number) - The DIstance between the waypoints in the queue.
- Waypoint Queue (composite): The first 15 waypoints (X1,Y1,X2,Y2,X3,Y3,...), #31= quantity, #32=total distance
13 Comments
TBF 25 Apr, 2023 @ 7:04am 
can you make it recycle way points so it goes through say 100 way points and back to way point 1 again?
Jackthedragonkiller [Chirch] 21 Mar, 2022 @ 12:24pm 
Oh ok, so the limit is as many as my PC can handle before imploding. Got it. Thank you! This MC is great and I'm definitely gonna be using it in future builds.
sengir_vampire  [author] 21 Mar, 2022 @ 10:51am 
the controller (lua) could handle billions of waypoints (theoretically). But at some point, the game will definitly get laggy. I never tried but I think 10,000 should be no problem.
Jackthedragonkiller [Chirch] 20 Mar, 2022 @ 1:31pm 
So I just found this and am using it on a plane that I am working on currently, and I'm in love with this. Works fantastically!

One question, how many waypoints can the controller actually hold?
Slofi 20 Oct, 2021 @ 4:02am 
Hehe, ok, never mind, my mistake, missing nod connection :) it works perfectly!
Slofi 20 Oct, 2021 @ 3:54am 
Hi! I have a proble, when I clear the queue, new waypoints can't be added, or at least my AP doesn't recognise them and boats just starts to spin around last WP. Any idea what I am doing wrong?

So the queue works fine for first set of WP, but if I clear it and add new WP it does not recognize them. Or my AP doesn't..
Slofi 19 Oct, 2021 @ 8:07am 
Great controller! Big thank you, sir!
sengir_vampire  [author] 31 Jan, 2020 @ 8:54am 
you have to hook the "waypoint reached" signal of the waypoint controller to the pop input of the queue controller
SamuelPepys 31 Jan, 2020 @ 6:06am 
Ah, cool. And that works with every waypoint, and not just the first, right? Like, if you have it hooked up to a digital display, it will output the distance to the first waypoint, then when that's reached, it will automatically move on to output the distance to the second waypoint and the same for the next 13 waypoints on the same digital display?
sengir_vampire  [author] 31 Jan, 2020 @ 12:33am 
The queue doesn't handle the GPS-Signal. If you want to calculate some data between your ship and the target use my Target Controller or my new Waypoint Controller with Composite Input for the queue.