Moving Y and Z.

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
zipperdude
CJ Worshipper
CJ Worshipper
Posts: 386
Joined: July 12th, 2007, 6:07 pm

Moving Y and Z.

Post by zipperdude » October 24th, 2008, 3:45 am

How do i make a brush move X and Z? i want it to move 215 Y, and 180 Z.
Show me what lies just beyond my eyes
Would you take me to the world where my spirit flies?
Tell me is that really fact or a pack of lies?

Twiztid = By . Blink = Song.
[color=#00FF00]Drofder2004[/color] wrote:Its not out of nowhere, I carry it in my backpack, with my elephant, 32 pets, a spare pair of leggings, 20 fish feasts, a staff I use to magically disenchant things, a stone I can use to travel home, 20000 arrows, a portable stable with a gorilla, a cat and a wolf, 20 bandages and massive quantity of cloth.

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Re: Moving Y and Z.

Post by Soviet » October 24th, 2008, 10:51 pm

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.
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: Moving Y and Z.

Post by Pedsdude » October 26th, 2008, 5:32 pm

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).
Image
Image

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Moving Y and Z.

Post by Drofder2004 » October 27th, 2008, 1:02 am

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
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Re: Moving Y and Z.

Post by Nightmare » October 27th, 2008, 1:27 am

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.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Moving Y and Z.

Post by Drofder2004 » October 27th, 2008, 3:21 am

Correct!
The specific answer I wanted was "all script objects should be given world origins".
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: Moving Y and Z.

Post by Pedsdude » October 27th, 2008, 2:27 pm

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.
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests