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
-
10.6k sflanker+2 5.4 years ago
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|. Thedistoperator is one of the options for the operator that takes two vectors (I believe the default option show in the toolbox isdotwhich takes the dot product). -
1,482 RikHar5.4 years ago
@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.
-
10.6k sflanker+1 5.4 years ago
If you are going to use an
ifinstead of await untilthen it will need to be inside of a loop. -
10.6k sflanker+2 5.4 years ago
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