Page 1 of 1

Move

Posted: Tue Jan 27, 2004 4:16 am
by Orion
I have a box target named $box1. i also have a script object target named $target1. how do i get the box to move to the target, not teleport, but slide sorta.

Posted: Tue Jan 27, 2004 9:12 am
by bdbodger
$box1 speed 50 // units per second
$box1 moveto $target1.origin
$box1 move // or waitmove

You can use :

$box1 speed 50 // units per second
or
$box1 time 4 // seconds

And welcome to .map

Posted: Tue Jan 27, 2004 9:32 am
by Bjarne BZR
Read more ways to move stuff in the command Appendix of the script tutorial.

And also: Welcome :)

Posted: Tue Jan 27, 2004 11:11 pm
by Orion
how would u use the waitmove command?

Posted: Tue Jan 27, 2004 11:40 pm
by nuggets
use waitmove to pause the thread at that point until it's finished moving

so
local.a = $box1.origin
$box1 time 5
$box1 moveto $target1
$box1 waitmove
$box1 moveto local.a
$box1 move

using this, the box will take 5 seconds to move to the target, then move back to it's original location

Posted: Wed Jan 28, 2004 12:45 am
by Orion
cool thanks.