origin problems

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

Moderator: Core Staff

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

Post by Drofder2004 » September 3rd, 2005, 11:55 pm

You need to use an "origin" brush to set the origin.

Make a door, then on the hinge side of the door, make an origin brush. The centre of that brush is where the rotation will happen.

I recommend scripting btw.
/me would also use the search feature ;)
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
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » September 4th, 2005, 12:11 am

Ok, for this i recommend scripting. The "func_" commands should have been removed from CoD engine, as they suck :P (along with the deadly CSG's).

So, check out this for now. (looks like Im going to have to make a small scripting tut ;))

this is what I posted in another thread, but I have adapted it for your needs...

Map
-Make the brush(s) and the hinge (origin brush).
-Select both and right click. then choose script<Brushmodel
-Press n to open entity window
Add these values
Key - Targetname
Value - <targetname> (This can be anything, but make it easy to remember)

-Save map and compile (No, thats not the end)

Scripting
This will be how your scripting will look, with some help...

//------------------------------------------//
//-------------Main Scripting-------------//
//------------------------------------------//

Code: Select all

Main () //Always start scripting with this
{
thread Spinning_Object; //This will tell the script to run these threads (you can have more than 1)
}

Spinning_Object() //This is the thread called from above
{
Spinner = getent ("<targetname>","targetname"); //This gives the door a script reference

while (1) //This makes the thread repeat when ti gets to the end.
{
Spinner rotateto ((0, 0, 360), 2); // This will make the door rotate 360 degrees on its Z-Axis from its origin (the 2 is seconds)
}
}
Now save that as "<mapname>_script.gsc" and put in the maps/mp folder
And if you havent already done so, you must make the main gsc.

This is pretty simple...
Just copy this format...

Code: Select all

main()
{
ambientPlay("ambient_mp_carentan"); //Background Noise

maps\mp\_load::main();
maps\mp\<mapname>_script::main(); //Loads the script

game["allies"] = "british";
game["axis"] = "german";

game["british_soldiertype"] = "airborne";
game["british_soldiervariation"] = "normal";
game["german_soldiertype"] = "fallschirmjagergrey";
game["german_soldiervariation"] = "normal";

game["attackers"] = "allies";
game["defenders"] = "axis";
}
Now save that as "<mapname>.gsc" and also put in the maps/mp folder

BTW, this is not tested, but its all I can do off the top of my head.
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

Rince
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 623
Joined: February 15th, 2005, 1:04 pm

Post by Rince » September 4th, 2005, 12:29 am

bored thot id do a random post
drofder seems 2 not wanna do our map:
|

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

Post by Drofder2004 » September 4th, 2005, 12:33 am

Rince wrote:bored thot id do a random post
drofder seems 2 not wanna do our map:
|
Stop hijacking threads and email me!

I have just got on my computer 30 minutes ago. Checking the posts on the forums, checking emails, etc. and soon I'm going to bed.

I doubt I will be using msn/xfire anymore, I am slowly losing my computer time to work/education/brother. So please.... EMAIL ME (if you send me an IM on these forums, it automatically emails me also) AND I WILL GET TO WORK ON THE MAP :? :|
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

Rince
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 623
Joined: February 15th, 2005, 1:04 pm

Post by Rince » September 4th, 2005, 12:50 am

( * Y * )

boobs

Rince
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 623
Joined: February 15th, 2005, 1:04 pm

Post by Rince » September 4th, 2005, 1:02 am


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

Post by Drofder2004 » September 4th, 2005, 1:15 am

Sam, take away the <>

I use them in tutorials

e.g <targetname> means "change this to the targetname" ;)

Also, when you get a script compile error, go to console and and scroll up until it tells you the exact problem.
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
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » September 4th, 2005, 12:48 pm

Main ()
{
thread Spinning_Object;
}

change to

Main ()
{
thread Spinning_Object();
}
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

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » November 8th, 2005, 5:02 pm

After a lot of trial and error and searching i finally got it to work how i (and sam) wanted it, so its a non stop rotating thing.

Code: Select all

Main () 
{ 
thread spinner(); 
}

spinner() 
{ 
spinner = getent("spinner","targetname");  
while (1) 
{ 

spinner rotateyaw(-360, 5); //5 = seconds to rotate. change rotateyaw to either rotateroll or rotatepitch to change the rotation axis

spinner waittill("rotatedone");
} 
} 

Pwn-Rikku
CJ Spammer!
CJ Spammer!
Posts: 679
Joined: August 15th, 2005, 7:58 pm

Post by Pwn-Rikku » November 8th, 2005, 6:57 pm

well done :)
Rikku - Old skool
Image
Image

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

Post by Drofder2004 » November 9th, 2005, 12:52 pm

Luke wrote:After a lot of trial and error and searching i finally got it to work how i (and sam) wanted it, so its a non stop rotating thing.

Code: Select all

Main () 
{ 
thread spinner(); 
}

spinner() 
{ 
spinner = getent("spinner","targetname");  
while (1) 
{ 

spinner rotateyaw(-360, 5); //5 = seconds to rotate. change rotateyaw to either rotateroll or rotatepitch to change the rotation axis

spinner waittill("rotatedone");
} 
} 
Yep, thats perfect coding :)

You could also use "wait 5;" instead of "spinner waittill("rotatedone");" but the way you have done it is a lot better.
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

Pwn-Rikku
CJ Spammer!
CJ Spammer!
Posts: 679
Joined: August 15th, 2005, 7:58 pm

Post by Pwn-Rikku » November 9th, 2005, 5:58 pm

well done luke :) ur getting better than me :P and i had to teach u fire.. :P
Rikku - Old skool
Image
Image

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » November 9th, 2005, 10:57 pm

Pwn-Rikku wrote:well done luke :) ur getting better than me :P and i had to teach u fire.. :P
lol thx, i guess the fire was a stepping stone :wink:

Pwn-Rikku
CJ Spammer!
CJ Spammer!
Posts: 679
Joined: August 15th, 2005, 7:58 pm

Post by Pwn-Rikku » November 10th, 2005, 6:09 pm

i take it i tripped over the next stepping stone^^ and never tryed to walk it again. lol
Rikku - Old skool
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests