zonekiller

A working non addon train

29 posts in this topic

after searching for some info about trains

then posting and asking for some info

then getting told to search again and my post closed.

and still finding nothing of use.

i decided to work it out myself - just took a lot longer than needed.

so for anyone that needs a working train without addons this maybe for you.

if it can be improved "im sure it can" please do so and post it up again

as there are very little about trains in this forum.

It works in MP also.

it seems to work better in A2 than OA

anyway have fun with it - jump on the gun and go for a ride :)

Download Sample Mission Here

ZKs_Train

Download Scripts Here

ZKs_Train_Scripts

Welcome to the ZKs 3D Rail Track Finder

Its very simple to use on any map.

If you want to use this on a different map then

open your editor.

place a unit on the map - make it player.

Give the unit a NAME.

save the mission.

copy all the files execpt mission.sqm to the saved mission folder.

DONE YOUR READY TO GO.

To use the ZKs 3D Rail Track Finder

Start the mission.

Once you in the mission

Goto the map and click on the area you want to have the

train move along.

you unit will be placed there.

Open the ZKs 3D Rail Track Finder action.

place the ball at the start of your route.

click Start.

then Click Add Rail Tracks.

Move with W - forward , S - Backwards , W & Up Arrow - Fast

along the track -- Track IDs will be shown on the Mini Map

if you make a mistake you can delete the markers and copied

IDs one at a time from the last one by pressing Detete.

Or you can delete the all of them by pressing INSERT.

once you have your route - keep in mind you only

need to go one way as the train will travel both ways -

also try and go one stop further at both ends as to

not see the train do a U-Turn :)

Press C to copy the array to the clipboard

then paste it into Train_Start.sqf

thats all there is to it.

if your working on a project and want to edit an array you have already made.

just paste the array into the Array_Builder\ZKsArray.sqf

in the Rail_Tracks = [];

and it will add all the markers ready to edit.

DownLoad the ZKs 3D Rail Track Finder

Edited by Zonekiller

Share this post


Link to post
Share on other sites

I just tried it out and I got to say, brilliant work zonekiller :D . I can picture it right now... ARMA 2 BATTLE TRAIN!! :D

I tried climbing in the cargo area of the train, unfortunately, if you stand in a structure that moves in ARMA you'll fall right out, but I mounted the KORD MG on the back and that works great :D

Share this post


Link to post
Share on other sites

Having tested this with ZK I'm really impressed!

Just a quick question ZK ... how difficult is it to add to other trainlines on other maps?

Share this post


Link to post
Share on other sites

the only array it needs is the track IDs "which you get from the editor" , out them in the tracks array and put the Land_loco_742_blue or Land_loco_742_Red near the track and off you go

when it get to the end of the array "the last track" it will turn around and come back by reading the array backwards

Edited by Zonekiller

Share this post


Link to post
Share on other sites

Just amazes me some of the really cool stuff to come out of this game!

Share this post


Link to post
Share on other sites

Nice idea, it open up some possibilities especially if some one made an armoured train :)

Share this post


Link to post
Share on other sites
I just tried it out and I got to say, brilliant work zonekiller :D . I can picture it right now... ARMA 2 BATTLE TRAIN!! :D

I tried climbing in the cargo area of the train, unfortunately, if you stand in a structure that moves in ARMA you'll fall right out, but I mounted the KORD MG on the back and that works great :D

Oh that's a shame, i would have loved to do some Littlebird insertions on a moving train... Brilliant work though!

Share this post


Link to post
Share on other sites

This is excellent. Well done! Now the railway line that goes all along the Chernarus coast has real significance.

---------- Post added at 14:06 ---------- Previous post was at 14:05 ----------

the only array it needs is the track IDs "which you get from the editor" , out them in the tracks array and put the Land_loco_742_blue or Land_loco_742_Red near the track and off you go

It's as simple as that? Well done sir!

Share this post


Link to post
Share on other sites
Oh that's a shame, i would have loved to do some Littlebird insertions on a moving train... Brilliant work though!

That would be nice. Its the same with all structures on ARMA, if it moves, it won't take anything along with it unless it is attached by an attachTo command. I tried testing a moving aircraft carrier once, the player will eventually fall right off and same with any other AIs who stand on it.

Share this post


Link to post
Share on other sites

Don't suppose you or someone else has the entire railway of ArmA: 2 already in an array? I just took a look and fell over at how much work this will require -_-

Share this post


Link to post
Share on other sites

Thanks Guys

i will be adding more of my stuff as stand alone scripts that you can just add to missions

Share this post


Link to post
Share on other sites

I'm glad to see this - very elegant solution! The locomotive enhancement addon I made is an attempt to make the locomotives look and work better (lights, smoke, horns) and it is nice to see other train projects.

Question 1 - how many cars have you tried at once?

Question 2 - Have you tried disabling the tracks to simulate a sabotaged track scenario? I'm trying to think of how to do since you can't kill the driver. Have you tried with a driver that can be killed?

Edit to add - I'm fairly certain there are ways you can get a dump of objects of a certain type. Someone was trying to do that for the landmine signs in OA so they could make minefields, and someone was asking about doing the same thing to find the repair garages so they could become repair stations similar in scope to the gas stations.

Edited by hcpookie

Share this post


Link to post
Share on other sites
Nice idea, it open up some possibilities especially if some one made an armoured train :)

Martin started a Polish armoured train for September 1939 a year ago or so. This will be a perfect opportunity to ask him to finish it ;)

Share this post


Link to post
Share on other sites

@hcpookie no i havnt tried to destroy it yet - getting it moving was hard enough :) ,

it would be good to see it in some missions :)

Share this post


Link to post
Share on other sites

All of the rail sections found here: ARMA 2\AddOns\structures\Rail\Railway.

The track .p3d's all have in their geometry LOD under properties: map=railway.

Under ARMA 2/AddOns/ui/config.bin, you can find under class RscMapControl, colorRailWay[] = {0.8,0.2,0,1};

If you could find a way to cultivate these from the map, you could use fnc_findRoute(thinking Ruebe here), and fnc_plotRoute(Ruebe again) substituting nearRoads in the function, with the script to get these objects.

I tried several tests of nearObjects, and only a couple of the .p3d's show up. At least where I tested.

rail_Zavora.p3d - rail crossing on road

rails_bridge_40.p3d - railway bridge

These are listed as class "house", and map = house. The railway sections themselves are listed with no class...

Edited by panther42

Share this post


Link to post
Share on other sites

i made this for them that want to use the train

its easy to use and shoud be able to do your train routes in just minutes

Welcome to the ZKs 3D Rail Track Finder

Its very simple to use on any map.

If you want to use this on a different map then

open your editor.

place a unit on the map - make it player.

Give the unit a NAME.

save the mission.

copy all the files execpt mission.sqm to the saved mission folder.

DONE YOUR READY TO GO.

To use the ZKs 3D Rail Track Finder

Start the mission.

Once you in the mission

Goto the map and click on the area you want to have the

train move along.

you unit will be placed there.

Open the ZKs 3D Rail Track Finder action.

place the ball at the start of your route.

click Start.

then Click Add Rail Tracks.

Move with W - forward , S - Backwards , W & Up Arrow - Fast

along the track -- Track IDs will be shown on the Mini Map

if you make a mistake you can delete the markers and copied

IDs one at a time from the last one by pressing Detete.

Or you can delete the all of them by pressing INSERT.

once you have your route - keep in mind you only

need to go one way as the train will travel both ways -

also try and go one stop further at both ends as to

not see the train do a U-Turn :)

Press C to copy the array to the clipboard

then paste it into Train_Start.sqf

thats all there is to it.

if your working on a project and want to edit an array you have already made.

just paste the array into the Array_Builder\ZKsArray.sqf

in the Rail_Tracks = [];

and it will add all the markers ready to edit.

DownLoad the ZKs 3D Rail Track Finder

Share this post


Link to post
Share on other sites

Marvelous work. Thanks for your contribution Zonekiller. You made it easy to apply it to an objective.

I made a mission using your script and attached some armor to it and have AI board the armor to man the turrents. Its used as a bombing objective in an I44 Dogfighter. I have a marker following it. I couldn't figure out how to make it quit moving after the armor is destroyed or destroy the train, but it still works because the objective triggers complete when most of the crew is dead which happens when the maned armor is destroyed. Its probably the jem of this mission.

Thanks again. Here's the example.

http://forums.bistudio.com/showthread.php?143777-TVT-144-Dogfighter-objective-based&p=2266794#post2266794

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now