Page 1 of 1

Moving Y and Z.

Posted: October 24th, 2008, 3:45 am
by zipperdude
How do i make a brush move X and Z? i want it to move 215 Y, and 180 Z.

Re: Moving Y and Z.

Posted: October 24th, 2008, 10:51 pm
by Soviet
you could also do a simultaneous movey and movez command if you don't want to deal with coordinates, but I wouldn't recommend it.

Re: Moving Y and Z.

Posted: October 26th, 2008, 5:32 pm
by Pedsdude
object moveto((x,y,z),t);

... where:

object = the script_brushmodel you're moving
x = how far in x-direction you want to move
y = same as above but y
z = guess... :P
t = amount of time it takes (in seconds)


In your case, you'll want this:

object moveto((0,215,180),1);

(assuming you meant 215 x and 180 y in the positive directions, and you want it to take 1 second).

Once it's done, all you have to do is 'object moveto((0,0,0),1);' to return it back to the original position (in 1 second).

Re: Moving Y and Z.

Posted: October 27th, 2008, 1:02 am
by Drofder2004
Pedsdude wrote:object moveto((x,y,z),t);

... where:

object = the script_brushmodel you're moving
x = how far in x-direction you want to move
y = same as above but y
z = guess... :P
t = amount of time it takes (in seconds)


In your case, you'll want this:

object moveto((0,215,180),1);

(assuming you meant 215 x and 180 y in the positive directions, and you want it to take 1 second).

Once it's done, all you have to do is 'object moveto((0,0,0),1);' to return it back to the original position (in 1 second).
Anyone else want to point out the bad points about this script?
:D

Re: Moving Y and Z.

Posted: October 27th, 2008, 1:27 am
by Nightmare
Oooo, me, me! Pick me!

When using moveto, the x,y and z variables that are being input are not how far it goes, but to what coordinate point it goes to.
Although, this all depends on how you set the origin up:
-If the origin is at the brush, then it will move away, and putting 0,0,0 will make it go back where it originally started.
-If you don't define the origin, then the game will use the map coords, thus moving in some undesired locations.

Re: Moving Y and Z.

Posted: October 27th, 2008, 3:21 am
by Drofder2004
Correct!
The specific answer I wanted was "all script objects should be given world origins".

Re: Moving Y and Z.

Posted: October 27th, 2008, 2:27 pm
by Pedsdude
Nightmare wrote:-If you don't define the origin, then the game will use the map coords, thus moving in some undesired locations.
Well it's always moved it relative to where the original script_brushmodel is for me, and (0,0,0) returns it to its original position.