Move

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Orion
Private
Posts: 3
Joined: Tue Jan 27, 2004 4:15 am

Move

Post 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.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Read more ways to move stuff in the command Appendix of the script tutorial.

And also: Welcome :)
Admin .MAP Forums
Image
Head above heels.
Orion
Private
Posts: 3
Joined: Tue Jan 27, 2004 4:15 am

Post by Orion »

how would u use the waitmove command?
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post 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
hope this helps, prob not cos it's all foreign 2 me :-/
Orion
Private
Posts: 3
Joined: Tue Jan 27, 2004 4:15 am

Post by Orion »

cool thanks.
Post Reply