I am new to trajectory design, and have been using GMAT to learn it since it's free, unlike STK. I have been trying to design a script that takes a spacecraft from Earth orbit to a halo orbit around Sun-Earth L2, where stationkeeping can then take place to maintain a halo orbit of radius ≈ 100,000 km. A burn simulating the launch vehicle that would do the transfer orbit insertion in real life leads to the spacecraft reaching the desired xyz position, and a second burn (the first in real life) does a breaking maneuver to lower vx, vy and vz such that it can orbit L2.
However, even after looking at the few GMAT sample scripts available involving halo orbits, I do not see any patterns that allow me to understand what the state of the spacecraft should be at the start of the orbit around L2 (i.e., what spacecraft position and velocity I should aim to achieve with the aforementioned burns), other than of course very small, near-zero velocity. Is determining that non-trivial, involving calculations and considerations depending on the epoch the script starts at and the position of the Sun and Earth, or is there some intuitive logic that I am not seeing?