Difference between revisions of "Talk:MoveTo"

Jump to navigation Jump to search
529 bytes added ,  19:10, 26 June 2006
workaround for calling on activators
imported>JustTim
m
imported>Scruggs
(workaround for calling on activators)
Line 28: Line 28:
:Yes, the behavior of this function on non-actors is a little weird. The best method seems to be a combination of MoveTo and SetPos. MoveTo ONLY works when the object moves into another cell and SetPos does NOT work if the object moves into another cell. Just call both functions and it should work. But you should call MoveTo last, since it might abort the script (like a "return").
:Yes, the behavior of this function on non-actors is a little weird. The best method seems to be a combination of MoveTo and SetPos. MoveTo ONLY works when the object moves into another cell and SetPos does NOT work if the object moves into another cell. Just call both functions and it should work. But you should call MoveTo last, since it might abort the script (like a "return").
:But there is a downside: The object loses its special behavior when moved by a setpos function. You can't activate it anymore and collusion doesn't work anymore. --[[User:JustTim|JustTim]] 05:06, 29 May 2006 (EDT)
:But there is a downside: The object loses its special behavior when moved by a setpos function. You can't activate it anymore and collusion doesn't work anymore. --[[User:JustTim|JustTim]] 05:06, 29 May 2006 (EDT)
After messing around with this function a bit, I'm finding that when called on an activator, it seems to update the activator's position without remembering to update the world art at the same time. Sometimes the object will remain in the same place after a MoveTo, but getPos returns its coordinates as having changed to the new position. So, after calling moveTo, if you call 'setPos x (getPos x)', it seems to force the world art to update. Haven't noticed any issues with collision or activation when using this workaround.
Anonymous user

Navigation menu