attatchtotrain is a known typo in the game code. And btw this is probably causing your crash:
followpath 0 spln_00 000 wait length 224 //spawn the train to here
The speed is 000. This makes the train start at the second spline tho.
attatchtotrain is a known typo in the game code. And btw this is probably causing your crash:
followpath 0 spln_00 000 wait length 224 //spawn the train to here
The speed is 000. This makes the train start at the second spline tho.
Hi again,
I did what you suggested. It now reads:
followpath 0 spln_00 200 wait length 224 //spawn the train to here
The reason i set it to 000 is because with 200 it spawns in the right place but then moves to spln_01.
However, uncommenting the attatchtotrain thing still crashes the game, whichever way i do it.
Can you think of anything else i may have done wrong?
Many thanks 
Hi,
Ok, i started again from the beginning as there must be something i’m doing wrong.
I’m not using models or clips for this test. I’m simply using a couple of brushes and a track.
This link shows 3 pics. 1 in Radiant, and 2 in ET:
http://xterm1n8or.webs.com/apps/photos/
You can see that my train (highlighted) in Radiant is just 2 brushes covered in wood texture. Scriptname/Targetname: train. Below this is an origin. Together they are my script mover.
It spawns on the track above, in between the red and blue player spawns.
In ET, the train spawns at spln_00 (where the glowing green button is), then moves to spln_01 (which i don’t really want it to do). You can also see that it has spawned back to front for some reason.
I then made car1 into a script mover (metal texture). Scriptname/Targetname: car1. When i add car1, it too spawns back to front and is attached to the front of the train instead of the rear. Also changing the number in the attatchtotrain command, doesnt make any difference. It always spawns at this point.
It does however bend as it goes round the track and it doesn’t crash now (the game, not the train).
Here is the script i am using:
game_manager
{
spawn
{
// Game rules
wm_axis_respawntime 1
wm_allied_respawntime 1
wm_set_round_timelimit 30
}
}
train //scriptname of script_mover
{
spawn
{
wait 300
followpath 0 spln_00 200 wait length 224
//spawn the train to here
}
trigger train_path
{
followpath 0 spln_00 200 wait length 224
followpath 0 spln_01 200 wait length 224
followpath 0 spln_02 200 wait length 224
followpath 0 spln_03 200 wait length 224
followpath 0 spln_04 200 wait length 224
followpath 0 spln_05 200 wait length 224
followpath 0 spln_06 200 wait length 224
followpath 0 spln_07 200 wait length 224
followpath 0 spln_08 200 wait length 224
followpath 0 spln_09 200 wait length 224
followpath 0 spln_10 200 wait length 224
followpath 0 spln_11 200 wait length 224
followpath 0 spln_12 200 wait length 224
followpath 0 spln_13 200 wait length 224
followpath 0 spln_14 200 wait length 224
}
}
car1 //scriptname of script_mover
{
spawn
{
wait 300
attatchtotrain train 448
}
}
// Scriptname of target_script_trigger entity
train_controls
{
// Target name of target_script_trigger
trigger train_start
{
// Calls train_path trigger within train function block
trigger train train_path
}
}
Thanks 
Edit: If i built my train back to front, you think this would help?
Hi,
Tried building the train back to front. It now spawns the right way round, but car1 is still infront of the train (being pushed not pulled)
This pic shows what i mean. Look at Train Test 1:
http://xterm1n8or.webs.com/apps/photos/
In my script for car1, i’ve tried attatchtotrain 1 to 1000 and -1 to -1000. It makes no difference.
Hope someone can help, this is doing my head in now 
Many thanks.
Hi,
I finally got this attatchtotrain thing working. I’m using brushes at the moment because it doesn’t seem to like models, the game crashes on map load, but i’ve got some more experimenting to do on this, just don’t have much time right now.
I used the garage door in fueldump, and basically changed the door pieces to my train and carriages, a few tweaks and i got it. I had a look at this before, but couldn’t find the doors (didn’t look hard enough) and so assumed it was a model using the model2 thing.
Anyway, as i hate reading threads that just end abruptly with no solution, or worse still; “I done it, thanks”, i thought i’d explain how i did it. I now have a train with any number of carriages running around my track 
For anyone interested here’s the script i used:
game_manager
{
spawn
{
// Game rules
wm_axis_respawntime 1
wm_allied_respawntime 1
wm_set_round_timelimit 30
// Train
globalaccum 4 set 0 // Train status (0=stopped, 1=moving)
globalaccum 5 set 0 // Train status (0=stopped, 1=moving)
wait 2000
}
}
// =================================================================================
//
// Train
//
// =================================================================================
train_trigger
{
spawn
{
accum 3 set 0 // Initial state of lever. (0=down, 1=up)
}
trigger main
{
trigger train_trigger up
trigger train_trigger down
}
trigger up
{
accum 3 abort_if_not_equal 0 // Lever up already ?
globalaccum 4 abort_if_not_equal 0 // Train moving ?
resetscript
globalaccum 4 set 1 // Train set to moving ...
accum 3 set 1 // Lever set to up position
trigger train_lever up // Move lever
trigger train forward // Start moving the train
}
trigger down
{
accum 3 abort_if_not_equal 1 // Lever down already ?
globalaccum 4 abort_if_not_equal 0 // Train moving ?
resetscript
globalaccum 4 set 1 // Train set to moving ...
accum 3 set 0 // Lever set to down position
trigger train_lever down // Move lever
trigger train reverse // Start moving the train
}
}
train_lever
{
trigger down
{
gotomarker train_lever_downpos 16
playsound sound/movers/switches/butn2.wav volume 128
}
trigger up
{
gotomarker train_lever_uppos 16
playsound sound/movers/switches/switch.wav volume 128
}
}
train
{
spawn
{
wait 200
trigger train_trigger up
}
trigger forward
{
stopsound // Kill all sounds to this entity
playsound sound/movers/misc/garage_door_start_01.wav volume 512
wait 50
playsound sound/vehicles/tug/tug_move.wav looping volume 512
followpath 1 spln6 150 wait length 600
followpath 1 spln7 150 wait length 600
globalaccum 4 set 0 // Train has stopped moving
stopsound // Kill all sounds to this entity
playsound sound/vehicles/tug/tug_idle.wav looping volume 256
}
trigger reverse
{
stopsound // Kill all sounds to this entity
playsound sound/movers/misc/garage_door_start_01.wav volume 512
wait 50
playsound sound/vehicles/tug/tug_move.wav looping volume 512
followpath 0 spln7 150 wait length 600
followpath 0 spln6 150 wait length 600
globalaccum 4 set 0 // Train has stopped moving
stopsound // Kill all sounds to this entity
playsound sound/vehicles/tug/tug_idle.wav looping volume 256
}
}
car1
{
spawn
{
wait 100
attatchtotrain train 304
}
}
car2
{
spawn
{
wait 100
attatchtotrain car1 560
}
}
car3
{
spawn
{
wait 100
attatchtotrain car2 560
}
}
car4
{
spawn
{
wait 100
attatchtotrain car3 560
}
}
car5
{
spawn
{
wait 100
attatchtotrain car4 560
}
}
Thanks for all your help 
any1 ever said to use [ code] tags when posting very long stuff? it is good because then your post will not become extremely long to scroll in the firefox, but a shiny new scrollbar appears in the post itself.