redditing Posted July 19, 2020 Share Posted July 19, 2020 I have a problem with setElementTarget recently, because I would like to make a script in which when I aim at something, "CreateWeapon" will shoot in that direction, but no matter what I do, it shoots too close or crooked. Anyone got any idea for this? Link to comment
Moderators IIYAMA Posted July 20, 2020 Moderators Share Posted July 20, 2020 (edited) 15 hours ago, redditing said: it shoots too close or crooked. Do you mean that it is inaccurate in some way? Or do you mean that you want to add spread, but that doesn't work out great? @redditing + You have to keep in mind that bullets created by a default weapon do have a different start point. They are NOT created from the weapon muzzle, but from target start. That means that if you set the target of the custom weapon to the target end position, the lines between the two weapons will cross at this point, instead of stay next to each other to the infinity-end position. So maybe try this instead: https://wiki.multitheftauto.com/wiki/GetPedTargetCollision Edited July 20, 2020 by IIYAMA more details. Link to comment
redditing Posted July 20, 2020 Author Share Posted July 20, 2020 1 hour ago, IIYAMA said: Do you mean that it is inaccurate in some way? Or do you mean that you want to add spread, but that doesn't work out great? @redditing + You have to keep in mind that bullets created by a default weapon do have a different start point. They are NOT created from the weapon muzzle, but from target start. That means that if you set the target of the custom weapon to the target end position, the lines between the two weapons will cross at this point, instead of stay next to each other to the infinity-end position. So maybe try this instead: https://wiki.multitheftauto.com/wiki/GetPedTargetCollision And this will help me get the positions of the NEAREST target I am aiming for? Link to comment
Moderators IIYAMA Posted July 20, 2020 Moderators Share Posted July 20, 2020 1 hour ago, redditing said: And this will help me get the positions of the NEAREST target I am aiming for? most likely 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now