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

Members Online

»
0 Active | 4 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 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Moving subway (sliding doors working)
Efraxskills
General Member
Since: Nov 10, 2009
Posts: 41
Last: Nov 22, 2012
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Tuesday, Sep. 13, 2011 12:13 am
Hi guys, efraxs here.

Im thinking to make a mp map with a subway working on it, i have it already (prefab), so im testing first how to move it in straight path (maybe one curve) all 3 subway wagons, and more importantly, how to put some working sliding doors in this wagons and move it along the wagons. Im reading tutorials about elevators and that kind of stuff, but i cant find something like this. I hope you can help me with this, like always.

sorry about my english, it sucks, but its the only what i got XD.

greetings.
Share |
sam_fisher3000
General Member
Since: Apr 18, 2007
Posts: 816
Last: Jul 16, 2016
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Tuesday, Sep. 13, 2011 02:29 am
This is a big project. I suggest starting off simple. You can't move prefabs but you can move the brushmodels within the prefab and you would need to do this, as this is the only way for things to work.

I don't know why you are looking up elevator tuts, you can, but this is fairly simple in a way. You can move each of the parts of the subway. I am guessing you have to wheels. You would use script to move the wheels. And for the wagon or the cart/cargo (whatever it's called I forgot), use script to move that as well. Moving it in a straight line is simple. Just use the movez function in script. You will find lots of tuts on moving brushmodels, etc.

For turning, that's a little tricky. You can use rotatez function.

For the sliding door, you just have to use the movez function as well. And have a trigger to movez again to close up.

Or you can use the actual train models and pretend it's the subway.

Hope this can help you get started!



Share |
9837265498
General Member
Since: Nov 6, 2009
Posts: 193
Last: Jan 23, 2012
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Tuesday, Sep. 13, 2011 01:33 pm
ok... i have done this before and Sam is right it gets complex quick.

If you want to move objects around the map i suggest pre-placing cars and nodes of some sort at each corner of your path.

name your first car "engine" or whatever, and connect all of them.

in your script do this:

Code:
car1 = getent("engine","targetname");
car2 = getent(car1.target,"targetname");
car3 = getent(car2.target,"targetname");
............................................
............................................

while(1)
{
car1 moveto(car2.origin, speed, accel, decel  );
car1 rotateto(car2.angles, speed, accel, decel);
car2 moveto(car3.origin, speed, accel, decel  );
car2 rotateto(car3.angles, speed, accel, decel);
car3 moveto(car4.origin, speed, accel, decel  );
car3 rotateto(car4.angles, speed, accel, decel);
............
...........

carN waittill("movedone");
}


This method works great if you have script_ents. The biggest problem I ran into was Script_brushmodels and corners. Since script_brushmodels do not have angles inherently, what i did was gave each car a script origin, which i linked to it, and compared it's angles to that of the car ahead. Another way which works but is a hassle is to have:

if( i am at a corner)
rotate(90);

but then it does not look like a train going around a corner.

as for the doors:

the easiest by far is a upward or downward blastdoor.
make the door, trigger, and use movez(72) or (-72) and your done. no matter how rotated it is it can always go up/down.

the realistic door is one or two part slider. Much harder on a rotating train.

what i would do is make the door/doors with the exact same origin as your train car. Then for each door have two script origins, one on the car origin another most of a door width away. link them, name the trigger, and start scripting.

make a trigger array, level.open boolean, and have each door be self.objects of the trigger. Then have it "if im closed" moveto open origin, " if im open", moveto closed origin. Also rotate the door with your cars aswell.

Like I said, it gets complex and a hassle most of the time
but when you get it working it is worth it.

GL!
Share |
sam_fisher3000
General Member
Since: Apr 18, 2007
Posts: 816
Last: Jul 16, 2016
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Tuesday, Sep. 13, 2011 02:37 pm
For going around corners, I don't think it's 90 degrees. I never seen a subway or train go directly 90 degrees, perhaps 45 degrees.

I don't know if he covered it but when you rotate you gotta move at the same time. Or else the subway stops and turns which doesn't look right. You can leave it like this for simplicity's sake but if you wan a realistic looking turn, you should rotate and move at the same time.

If you got the time, do it! It will take you sometime to complete.
Share |
Efraxskills
General Member
Since: Nov 10, 2009
Posts: 41
Last: Nov 22, 2012
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Tuesday, Sep. 13, 2011 09:48 pm
Thank you for the help guys, i'll give a try.

Just for keep it simple, im thinking to move the subway in straight line. ah!! and By the way, i found this:

Here

but the problem would be the sliding doors, so the next cuestion is what can i do to attach the doors? i heard a lot about the linkto() and attachto() functions but i dont know how to use it. hope you can help me with this too, right now im going to focus in the subway movement.

greetings.
Share |
Efraxskills
General Member
Since: Nov 10, 2009
Posts: 41
Last: Nov 22, 2012
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Saturday, Sep. 17, 2011 01:28 am
Hi again guys.

well, this is the best i can (with my scripting knowledge):



thank you for the help and i look forward to make the sliding doors work.

greetings[wave]
Share |
sam_fisher3000
General Member
Since: Apr 18, 2007
Posts: 816
Last: Jul 16, 2016
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Saturday, Sep. 17, 2011 04:59 pm
Looks good. I like the subway model.

You can just keep it simple. Make it go straight instead of turning it. If you're ready you can make it turn.
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Saturday, Sep. 17, 2011 06:37 pm
Looks great. Nice brushwork on the Subway. [cool]

If you are going to make the doors open and close, just remember that players can get stuck in the doors, so make sure you find yourself a fix for that. Some players will do it purposely.

For example: When a player hits the trigger to make the Subway move, all the doors close or are they separately operated? Did a player get stuck in a door while another player hit the trigger to move the subway? Is there a kill trigger or hurt trigger connected to the door and only showing itself when the doors close? Thus keeping players out of the doors while the subway wants to move.

A few things to think about.
Share |
Efraxskills
General Member
Since: Nov 10, 2009
Posts: 41
Last: Nov 22, 2012
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Sunday, Sep. 18, 2011 11:41 pm
Thanks, i appreciate the comments.

I have a new cuestion for you guys: it's possible to move an FX ? for example:

The subway moves and someone is shooting against the wagons, so the subway accumulates damage. in certain level of damage (80%) the subway shows some smoke/fire/sparks (in movement of course) and slow down the speed until reach 0 mph. Well this sounds complex, so instead of that how about to move a single FX from a point A to a point B.

Again, Thanks for the comments and the sugestions.


Efraxskills.[wave]
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 482
Last: Jun 28, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Monday, Sep. 19, 2011 12:07 am
it is possible

when your model recieves damage youll do this with
Code:
train waittill( "damage" , damage , attacker , weapon....... , point );

i dont know the right syntax of this damage-notify, but the 'point' in there should tell you the position of the impact
on this position you can spawn + link a script_origin or a script_model and move it with the train, when you play the effect there, it will move with the train

maybe you want to play the effect only from - maybe the engine or the wheels - you dont need the 'point' in this case, just spawn + link the script_origin/model to this position

there should be 1 or 2 tutorials on this side, they'll help you with the effects

but the train looks rly nice, and the movement too, i wouldnt move it in a curve, its harder to script and probably doesnt look this smooth
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP 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

»