

Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!

paypal.me/F3ARxReaper666![]() | Has released one or more maps to the UGX-Mods community. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() UGX V.I.P. | |
![]() | Has shown excellence and experience in the area of custom mapping in the UGX-Mods community. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
I don't believe there is a way to stop an entity from moving after calling MoveTo() on it; however, an alternative would be to have the entity move in increments and just stop telling it to move when you want it to stop.
This is a bit lenghthy of an explaination but the way I might approach this would be:Spoiler: click to open...Get the distance between the entity and location you want it to move to, then divide that by the amount of increments you think is appropriate. Once you have the length of each increment, then you can get a vector in the direction of travel by subtracting the origin of the location its moving to by the origin of the entity, then normalize the vector by dividing each component of the vector by the distance (ie: x/dist, y/dist, z/dist). With this vector you can multiply each component of it by the length of the increment to get a vector in the direction of travel with the length of the increment. So, finally you just have a loop (which loops through the amount of times as there are increments - or breaks when you want it to stop) and have the entity move to its origin plus the vector we just calculated. The wait that you would put in the loop would be the time to move to the next increment, so you can just think of it as the total time divided by the amount of increments.[close]
I hope this helps.
![]() | Has released one or more maps to the UGX-Mods community. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
Edit: Well... after consulting with Pieman, we've come to the conclusion that my method was way too complicated and you can stop the movement by telling the entity to move to its own location. Awesome Pieman did a test seeing that MoveTo's actually cancel each other out.
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
waittill_not_moving()
{
origin = self.origin;
while( 1 )
{
wait .05;
if ( self.origin == origin )
break;
origin = self.origin;
}
}![]() | |
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
basically i have a script that moves something toward something else using moveto();
what i need is a way to stop it before reaching its destination BEFORE reaching it after a variable is changed
or if theres another way to do this that could also work, thanks