Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 13 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty
Category: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
Author Topic: Trains in map
codmp
General Member
Since: Feb 7, 2006
Posts: 905
Last: Aug 1, 2011
[view latest posts]
Level 7
Category: CoDUO Mapping
Posted: Wednesday, Apr. 4, 2007 02:44 am
Your script looks right to me from the quick glance of it. To save you some scripting, you could try linking the train_clip to the train: train_clip linkto(train);

Doing this will make it so you will only need the train moveto functions and not both the train and train_clip moveto functions.
Share |
Slayer2746
General Member
Since: Oct 13, 2006
Posts: 70
Last: Oct 28, 2009
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Wednesday, Apr. 4, 2007 05:54 am
ok clips are annyoing so im using brushes and made them script_modelbrushes they move fine except the move on an angle like ---
------
-----------
poijnt starights but doesnt go staright script and orgins are fine?
Share |
Slayer2746
General Member
Since: Oct 13, 2006
Posts: 70
Last: Oct 28, 2009
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Wednesday, Apr. 4, 2007 01:45 pm
idk if this would make this easier but u wanna add my xfire? slayer2746
Share |
Birdyman
General Member
Since: Nov 14, 2005
Posts: 55
Last: Nov 23, 2011
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Friday, Jan. 11, 2008 01:01 pm
Slayer2746 writes...
Quote:
Ok well I like the tutorial from sunday, but when i tried to do the same thing with anthoer model at the corner it turned 90 degress then at then end it went down in the ground[confused]
Also my other train which was the same urs turns over on its side, would patches be the problem or having it go down a little ways be bad>?[sniper]


can somebody tell me wich where i can find this train tutorial where this guy is talking about? [confused]
i have allready search the whole forum for it but cannot find it
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoDUO Mapping
Posted: Friday, Jan. 11, 2008 02:51 pm
Most likely either this tutorial (for moving things) or this tutorial (about flying stukas).

What do you want to know exactly? Because that way we can help you better.
Share |
TexasRebel
General Member
Since: May 1, 2006
Posts: 373
Last: Aug 20, 2013
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Friday, Jan. 11, 2008 07:15 pm
A long time ago when i was trying to make an entire map with a moving train I decided to throw together a small sample of one for the public. Here is the download for it

http://www.modsonline.com/Downloads-full-3753.html

The 90 degree problem the other person mentioned was because of how i positioned the models, and therefore i needed to subtract 90 degrees to get the train to go around the curve. Most likely the person just copied and pasted it without changing it to his needs.
The other problem he experienced was because his waypoint origin was below the origin of the train.

If you have any questions Ill be more than happy to help ya out.

Share |
Birdyman
General Member
Since: Nov 14, 2005
Posts: 55
Last: Nov 23, 2011
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Sunday, Jan. 13, 2008 03:29 pm
hi,

its not realy long ago only 8 months.
anyhow, thanks for the map.
it helps me alot.
iam also try to make a map with a riding train.
why did stop with the train project?
Share |
TexasRebel
General Member
Since: May 1, 2006
Posts: 373
Last: Aug 20, 2013
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Sunday, Jan. 13, 2008 10:04 pm
you know right now i can not really remember why I stopped it, but I wont be starting it up for sometime now. Busy mapping for Heart of the Battle and with College I just dont have the time anymore. I can still help ya though if ya need it, just ask.
Share |
Scratchy
General Member
Since: Feb 10, 2006
Posts: 276
Last: Mar 16, 2009
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Sunday, Jan. 13, 2008 10:15 pm
Been working on this code. Hope it can help someone.

Code:
Main()
{
//Versatile Train
//Thanks to |TM|TexasRebel for his train move script, and Playername for help with debugging
//By Scratchy
//
//Needed in Map:
//-A Script Brushmodel or Script Model that will be the train. Needs to have these value...
//Key: targetname		Value: train
//
//-Anything with an origin can be used for the waypoints, as long as they have the value...
//Key: targetname		Value: waypoints
//
//-If you want the train to wait at a waypoint give it this value...
//
//Key: waittime		Value: (time you want the train to stop in seconds)
//
//-The waypoints will also need to be numbered with this value...
//Key: track		Value: 1
//
//^Start with 1, and go up from there. The train with follow by track number.^
//
//What Does it do?
//
//-This script will take a train, and make it follow a series of waypoints in the map.
//After completing predefined loop, the trains stops.


Train = getent("targetname","train");
Waypoints = getentarray("targetname","waypoint");
Wheels = getentarray("targetname","wheels");
Spawn = getentarray("track","1");
Wheels linkto(Train);
Train moveto((Spawn),0,0,0.05);

//How many times you want the train to loop the track.
//1 for one go around. Do not enter 0 or negative integer.
Loop = 1;
speed = 150;

//If you want the train to never stop, then change this next line to...
//While(1)
for(j=0;j<Loop;j++)
	{
	for(i=1;i<Waypoints.size;i++)
		{
		wayStart = getent("track", i);
		wayEnd = getent("track", i+1);
		thread Wheels Wheels_spin(Speed);
		Train_Move(wayStart, wayEnd, Speed);
		}
	}
}

Train_Move(wayStart, wayEnd)
{

if(isDefined(wayStart.waittime))
	wait(wayStart.waittime);

dist = distance(way1Start.origin,wayEnd.origin);
time = (dist / speed);
angles = vectortoangles(wayEnd.origin - wayStart.origin) - (0,90,0);
train rotateto((angles),0.001);
train moveto((wayEnd.origin),time);
train waittill("movedone");
}

Wheels_spin(Speed)
{
dist = distance(way1Start.origin,wayEnd.origin);
time = (dist / speed);
circum = 50 * 3.14;
spin = dist / circum * 360;
self rotatevelocity ((0,0,spin), time);
}
Share |
TexasRebel
General Member
Since: May 1, 2006
Posts: 373
Last: Aug 20, 2013
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Sunday, Jan. 13, 2008 11:56 pm
Very nice condensed version Scratchy, should make it a lot easier for people since they wont have to have a huge code.
Share |
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
MODSonline.com Forums : Call of Duty : CoDUO Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»