I managed to get my vehicle to auto steer towards a target and drive there. How Do I Make it stop when I get there? lol.
I need a "{if {target is reached} the set brake to 0} like command but cant figure out how.
Tags
Vizzy5 Comments
- Log in to leave a comment
-
Mod sflanker
Sorry about the < that is because there is an issue with the markdown processor on this website that prevents it from displaying less than signs in code blocks, I fixed it using a unicode alternative. If you see
<
it should be<
.If you are trying to reach a targeted craft then instead of using the distance to a lat/long/AGL converted to a PCI position, you can just use the distance from your position to your target:
nav |Target Position|
. Thedist
operator is one of the options for the operator that takes two vectors (I believe the default option show in the toolbox isdot
which takes the dot product). -
1,467 RikHar
@sflanker I just set my target from map view and my vehicle goes there. Also, where do i find these /dist/ and convert commands? are they custom? what is the <? Sorry for all the questions, been playing SR2 for a while now ,im just now starting to use vizzy so still trying to figure out a lot.
-
Mod sflanker
If you are going to use an
if
instead of await until
then it will need to be inside of a loop. -
Mod sflanker
You probably want to engage the brakes once your distance to the target is below a certain threshold. Assuming you have your destination as lat/long/AGL coordinates, this would look something like this:
> wait until [ [ [nav |Position|] |dist| [convert [$your_destination_coords] to position] ] < 10 ] > set |Brake| to [1]
the only part im having an issue with is ....[convert [$yourdestinationcoords] to position]. little lost here