Page 1 of 2
scripting: moveto
Posted: August 8th, 2006, 2:32 am
by creator
is there a scripting tut about:
moveto?
or can anyone post a moveto script here
so i can try figure out how it works?
(learning scripting)
i can do the basics
Posted: August 8th, 2006, 7:54 am
by Marshall
ok here you go:-
First off create ure brush (size, length ect), then before u convert it to brushmodel, add a 1x1 brush inside it, and texture it tools>origin...
Then convert them both to brushmodel, (remembering to make them 1 brushmodel)
This means you can now move the origin to the point u want to, and not have to guess where the platform is going to go..
then place this in ure gsc:-
(im sure ure cabable of knowing where to edit the script

)
Code: Select all
main()
{
thread door_slider ();
}
door_slider ()
{
door = getent ("slide ", "targetnameâ€);
trig = getent ("slider_trigger ", "targetnameâ€);
while (1)
{
trig waittill ("trigger");
door moveto ((100,200,300), 1); ///// ure brush will move to them co-ordinates in one second
door waittill ("movedoneâ€);
wait (4);
door moveto ((120,220,320), 1); //// ure brush will move to them co-ordinates in one second
door waittill ("movedoneâ€);
}
}
Hope i helped..
For more info visit
http://www.modsonline.com
Marshall
Posted: August 8th, 2006, 9:49 am
by Luke
You don't need the origin brush for that script, not unless you're rotating something or defining origins in the script.
And just to make it easier for you to understand ((100,200,300), 1); the first 3 numbers represent x,y,z so what thats actually doing is moving 100 units on the x axis, 200 on y, 300 on z. all at the same time.
Posted: August 8th, 2006, 9:55 am
by Marshall
well
i assumed he would know where the co-ordinates (very basic script knowledge)
and by adding the origin brush, u can be clear of the exact end position of the brush..
Marshall
p.s please read
http://www.modsonline.com/Tutorials-read-121.html
Posted: August 8th, 2006, 9:46 pm
by creator
no i didnt knew that
cause i always used
movex
movey
movez
so know im trying to learn more scripting commands

Posted: August 9th, 2006, 1:09 am
by creator
Marshall wrote:texture it tools>origin
i think u mean:
common/origin
Posted: August 9th, 2006, 1:15 am
by Drofder2004
creator wrote:Marshall wrote:texture it tools>origin
i think u mean:
common/origin
Yep, for CoD2 its tools<origin, vCod press S and type "common/origin" (without "")
Posted: August 9th, 2006, 1:19 am
by creator
drofder
can u share ur "scripting technologie" with me:)
(deleting a brush and let it respawn again)?
cant keep this secret for ever!

Posted: August 9th, 2006, 1:23 am
by Luke
creator wrote:drofder
can u share ur "scripting technologie" with me:)
(deleting a brush and let it respawn again)?
cant keep this secret for ever!

Why delete it when you can just hide it?
brush notsolid(); //delete
brush hide();
wait 5;
brush solid();
brush show(); // respawn
Posted: August 9th, 2006, 1:26 am
by creator
luke can u add my x fire?
milkshakee
or msn
creator-mapper@hotmail.com
i wana ask u something about it
not on here (causes spam)
Posted: August 9th, 2006, 1:51 am
by Drofder2004
creator wrote:not on here (causes spam)
He has got a PM box

Posted: August 9th, 2006, 1:54 am
by creator
lol same as emailing to
luke@codjumper.com

Posted: August 9th, 2006, 1:55 am
by creator
Luke wrote:
brush notsolid(); //delete
brush hide();
wait 5;
brush solid();
brush show(); // respawn
oooooohhhh drofder

baby

u know how this works

?
if yes please explane it to me

and can u tell me how to make like walls half a circle
in cod1)
and no i dont want to make a cylinder
or luke)
or anyone else)
Posted: August 9th, 2006, 2:02 am
by Luke
creator wrote:luke can u add my x fire?
milkshakee
or msn
creator-mapper@hotmail.com
i wana ask u something about it
not on here (causes spam)
i'd rather u spam the forum than my msn/xfire
Posted: August 9th, 2006, 2:10 am
by creator
ok but.. why didnt u post here what i just asked than this message...
would be more helpfull than the 1 u just made...
