script:moving walls?
Moderator: Core Staff
script:moving walls?
is there a way i can make a script where you can move walls... im working on a trickjump map and i want to be able to open up the wallas from the middle to the side.. im using Graydiant btw
ty in advanced
ty in advanced
use the same scripting used here:
http://codjumper.com/forums/viewtopic.p ... 63&start=0
just with walls instead of platforms.
Of course post if you have any questions about the tut or its not working
http://codjumper.com/forums/viewtopic.p ... 63&start=0
just with walls instead of platforms.
Of course post if you have any questions about the tut or its not working

scropting:moving walls
ok so does this look correct?
targetname
wall1
name :wall
and i also,,do not have a texture named trig... or func... i need trig for thisand im just bringing up func too...func,wut i use to make door rotating
targetname
wall1
name :wall
Code: Select all
main()
{
maps\mp\_load::main();
maps\mp\wall1::main();
maps\mp\wall2::main();
}
name :wall1
main()
{
thread wall1();
}
wall1()
{
wall = getent ("wall1","targetname");
while(1)
{
wall moveY (208,2,0.5,0.5);
wait(5);
wall moveY (-208,2,0.5,0.5);
wall waittill ("movedone");
}
}
name:wall2
main()
{
thread wall2();
}
wall2()
{
wall = getent ("wall2","targetname");
trigger = getent ("trig_wall","targetname");
while(1)
{
trigger waittill ("trigger");
wait(2);
wall moveY (208,2,0.5,0.5);
wait(5);
wall moveY (-208,2,0.5,0.5);
wall waittill ("movedone");
}
}
like this?
and i also,,do not have a texture named trig... or func... i need trig for thisand im just bringing up func too...func,wut i use to make door rotating
not sure about how to make a rotating door but i know it involves connecting a origin brush to a brush_scriptmodel. You can make those walls any textures you want, just make sure you right click and make the entity script_brushmodel.
That looks right to me, but i know very little about scripting so that could very easily be wrong
That looks right to me, but i know very little about scripting so that could very easily be wrong
I assume you've read that tutorial, and know each code below where you have name: should be separate gsc's. When you post a code, the proper way would be to put each code inside separate code tags, so its easier to understand.
But I don't see the point in having a separate gsc file for every wall you want to move, you may want to have all your walls in 1 gsc and all your doors in another, you could have it all in 1 gsc if you wanted, but it's up to you how you want to manage your scripts. You'll end up with loads of files if you make a gsc for every function, so this might be easier for you:
Rather than having 2 gsc's for your walls, put them in 1:
Name that gsc whatever you want, for example "walls". Then you can load the above script with your mapname.gsc like this:
To make a door you need to give it an origin textured brush as soviet said. It doesn't matter what size the origin brush is, it's just going to be using the very center of the brush as its origin. So place that where you want the doors pivot point, or hinge. Now select both the door and the origin brush, right click and make them a script_brushmodel, and give it a targetname of say "door1". Now make a trigger brush, the trig texture is found in common, right click and select trigger>use. Give it a targetname, for example "door1_trig" and thats the mapping done.
Now if you want, you can create a new gsc file and use a simple code like this for the door:
But I don't see the point in having a separate gsc file for every wall you want to move, you may want to have all your walls in 1 gsc and all your doors in another, you could have it all in 1 gsc if you wanted, but it's up to you how you want to manage your scripts. You'll end up with loads of files if you make a gsc for every function, so this might be easier for you:
Rather than having 2 gsc's for your walls, put them in 1:
Code: Select all
main()
{
thread wall1();
thread wall2();
}
wall1()
{
wall = getent ("wall1","targetname");
while(1)
{
wall moveY (208,2,0.5,0.5);
wait(5);
wall moveY (-208,2,0.5,0.5);
wall waittill ("movedone");
}
}
wall2()
{
wall = getent ("wall2","targetname");
trigger = getent ("trig_wall","targetname");
while(1)
{
trigger waittill ("trigger");
wait(2);
wall moveY (208,2,0.5,0.5);
wait(5);
wall moveY (-208,2,0.5,0.5);
wall waittill ("movedone");
}
}
Code: Select all
main()
{
maps\mp\_load::main();
maps\mp\walls::main();
}
Now if you want, you can create a new gsc file and use a simple code like this for the door:
Code: Select all
main()
{
thread door1();
}
door1()
{
door1 = getent ("door1","targetname");
door1_trig = getent ("door1_trig","targetname");
while (1)
{
door1_trig waittill ("trigger");
door1 rotateto ((0, -90,0), 1);
wait (2);
door1 rotateto ((0, 0,0), 1);
}
}
scripting:wallmove
ok.. i will try and c how it works.. but i know how to make doors rotate u just mak a door with a brush connecting with origin on oposite side of door.. the problem is i used to rightclick after the three brushes were high lighted and there would be something called func.. under there i would select door rotating.. but func isnt there :\
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
'funcs' are quake commands, that CoD left in the game, not recommended to use them.
To create a door you need to first create the door (duh?) then you need to create a hinge. The hinge is where you want the door to rotate from. Give the hinge an "origin" texture and then select both and do "script_brushmodel".
To create a door you need to first create the door (duh?) then you need to create a hinge. The hinge is where you want the door to rotate from. Give the hinge an "origin" texture and then select both and do "script_brushmodel".

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
scripting:moving walls
umm i tried both ways and they didnt work :\
cod radiant
i am planning on starting to use radiant since i mostly see scriptis and tut's for it so i started using it ... its fine but wen i try to zoom in in the graphic box where it shows my maps it goes wicked fast and backs me up and crap so i lose sight of the object then i look in 2d window it on otheer side of graph.. plz help ill try and find soome setting up the editior thing TY 

Re: cod radiant
Most scripting in uo applies the same to cod, the main difference is you can't use vehicles.HavoC wrote:i am planning on starting to use radiant since i mostly see scriptis and tut's for it so i started using it ... its fine but wen i try to zoom in in the graphic box where it shows my maps it goes wicked fast and backs me up and crap so i lose sight of the object then i look in 2d window it on otheer side of graph.. plz help ill try and find soome setting up the editior thing TY
For the 3d window? edit preferences and lower the camera speed.
scripting?
ok ty,, but is there a way a can make it like graydiant... for me i have to click top of box to move forward bottom backwards then it takes me a whiel to turn because i spin around wen i try to turn?
scripting needed
ok ty,,, but i only have half the buttons its showing on ur pic so i dont have that button,, + i just wentinto radiant,, everythings not wehere it supposed to be,, theres a console then a camera then graph but u can drag them around and there not full size x(
Who is online
Users browsing this forum: No registered users and 1 guest