ChooChoo Trains Script

Assuming you are using this script: http://opendayz.net/threads/choochoo-trains-script.12066/#post-35675

As far as I can see there shouldn't be any issues running it on 1.0.2.5. Do you see anything in your .rpt file. Also might be worth adding some debug code in to see what is happening..

there is kindof a big issue due to the fact dayz_locationCheck is never defined in epoch 1.0.2.5 and will always be nil so the script never starts to fix this i replaced dayz_locationCheck with dayz_slowCheck and removed terminate dayz_locationCheck;
Code:
chooChooCode2 = {
        waitUntil { !isNil ("dayz_locationCheck") };
        _train = _this select 3;
        while {true} do
        {
            _pos = getPos _train;
            sleep 15;
            if ((_pos distance _train) < 10) then
            {
                terminate dayz_locationCheck;
                {
                    deleteVehicle _x;
                } foreach (nearestObjects [[6684,2781], ["land_cncblock_stripes", "hiluxwreck"], 10] + nearestObjects [[7976,3288], ["uazwreck"], 10]);
                _this spawn chooChooCode;
            };
        };
    };
to
Code:
chooChooCode2 = {
        waitUntil { !isNil ("dayz_slowCheck") };
        _train = _this select 3;
        while {true} do
        {
            _pos = getPos _train;
            sleep 15;
            if ((_pos distance _train) < 10) then
            {
                {
                    deleteVehicle _x;
                } foreach (nearestObjects [[6684,2781], ["land_cncblock_stripes", "hiluxwreck"], 10] + nearestObjects [[7976,3288], ["uazwreck"], 10]);
                _this spawn chooChooCode;
            };
        };
    };
 
Bushwookie420, i change the code as you said, but, doesn´t works.

With older code, trains apeaars at map, but stopped.

With your new changes, it doesn´t appears at all.

Very sad :(.
 
I installed it about 3-4 months ago and i can confirm it worked on my DayZ 1.8.0.3 server DayZ.st ... it was pretty cool it was like a 2-3 door train that went from cherno to elektro with a chance to go other places as well but i would love to see somone improve this script
 
I had it working fine on my Epoch Servers (1.0.4.2/103718), but annoyingly the last 3 reboots it's just sat tangled up in Cherno Station...not sure how I broke it or if it's just luck.

Also how do you add the gun?
The trainstart.sqf says

//add this to the init of the train

// this == train - 1 == if you want the gun on the back
// _nil = [this,1] execVM "Scripts\Train\Train_Start.sqf";

But i don't understand what it means....
 
I installed it about 3-4 months ago and i can confirm it worked on my DayZ 1.8.0.3 server DayZ.st ... it was pretty cool it was like a 2-3 door train that went from cherno to elektro with a chance to go other places as well but i would love to see somone improve this script
Need I say it... Sheep is here! I'm adding this to the repack so I'll see if I can improve it, i will add a check to see if train is moving and if it's not (train tangled) it will reset the train, I'm also makesng it travel the entire train line :p
 
Dude that would be fantastic!
If you need someone with a towel and a water bottle standing behind you giving you motivational speaches and shoulder rubs just give me a shout XD, loving this script while it was working and would love to see it back.
Tried looking at it myself and I can safely say this is several leagues above me and I'm not going to be any help XD
 
Dude that would be fantastic!
If you need someone with a towel and a water bottle standing behind you giving you motivational speaches and shoulder rubs just give me a shout XD, loving this script while it was working and would love to see it back.
Tried looking at it myself and I can safely say this is several leagues above me and I'm not going to be any help XD
:p was trying to fix it before but booze and coding is a bad idea ( I got promoted at work again! Senior Exchange Engineer) learnt that the hard way lol, any way weekend soon and I have no kids (gotta love grand parents :) ) so I think I'll get a bit done, also I've started making map addtions like extra barracks, train wrecks, extra super markets etc. They will be totally customizable and sqf based.
 
dude your path stats is wrong. such a simple event, your direction does not inc the evec statement. in init. it has no hope off working in a month off sundays its like something korvash ould fuck up your server with
 
Back
Top