rail gun train


(vince829) #21

Ok this is what I have so far:

train
{
spawn
{
wait 300

followspline 0 spln0 50000 length 32 wait

trigger self train_path 

}
trigger train_path
{
followspline 0 spln0 100 wait
followspline 0 spln1 100 wait
followspline 0 spln2 100 wait
followspline 0 spln3 100 wait
followspline 0 spln4 100 wait
followspline 0 spln5 100 wait
followspline 0 spln6 100 wait
followspline 0 spln7 100 wait
}
}

So right now it automatically runs and dissapears at the end of its route.

  1. Can someone give me an sample script of what I need to make the train move backwards with the axis on it and forward with the allies on it. I also need to know what I have to do in gtkradiant since what I already have. I know what I need for a tank and I tried in railgun.script but I can’t find what I need because there is so much added things I don’t need and I can’t tell what I do need.

2)My train moves perpendicular to the tracks which means the train is running on the tracks with the front of the train and the back of the train is off the tracks. How do I make the train parallel to the tracks right on top of it like a normal train would look?

  1. How do I keep my train from disappearing at the end?

Thanks for the all help and for being patient. I am starting to actually get something together. I have only been mapping for about a month and this is the last thing I need help on.


(Diego) #22

Will you train be using cranes to load up an objective? Or are they just to move players around? Like you said, there is a whole lot of stuff in the original Rail Gun train script but you will need it if you want your train to behave the same way. Will you be utilizing a track switch or some kind of blockade in the middle like in Rail Gun? Which team do you want to have control of the train on the offensive run?

I basically grabbed all of the entities for the train 1 from Rail gun along with the spline points and cranes. When doing that, you really have to make sure you get all of your script mover and entity origins set to the new locations. I place all of my script movers in a staging area off the map and rely on the followspline command to move them into postion at run time. So if your train is not facing the right angle, just rotate your brushwork 90 degrees and it should line up.

Getting back to the script, like I said there is a lot of stuff in there that seems to be really needed to get the train to perform the way it does. I know someone as script savy as Isbowten can probably help you out more if you really want to do it from scratch. But you will probably save yourself a lot of headache if you start with the one from Rail Gun. I tried to go through the original script and added more annotations to it and reordered things in a way that I felt made it easier to figure out. There are still some areas of the script that I’m not quite sure of, and I probably have made some annotations that are actually incorrect. But after some trial and error, I have everything working fine right now.

But basically, the script has team enablers, timer counters, multiple followspline scripting for all 3 of the script movers: train, train_back (which is the cargo bed), and the ammo. It also is hacked with stuff that controls the autospawn of the axis and allied players. I threw this stuff out because I don’t need that. In my script, I replaced the track switch barricade with a tunnel door that has to be raised and lowered. I also had to reverse some of the axis and allied trigger scripting because the allies are on the offensive in my map. The train also uses globalaccums to determine which direction the train should be traveling in for each team. This is very important if you are using them to pick up a load and return it to the original location.

I did not need the train_2 scripting at all because I am loading my cargo onto a truck for the second stage of movement.

For me, the only way I was really able to start interpreting what was going on in the train script was to import all of the train and crane elements into a completely new map. I slapped some texture onto the clip brushes so I could see the thing and then started playing around with the script that I exported into a clean script file for the new map. Once I had my necessary alterations working ok, I brought in only the entities that I needed into my actual map and placed the spline points where I needed them.

I’m still having a little trouble with my second crane though. That one moves at a 45 degree angle and is giving me some issues. So do yourself a favor and try to keep the start and end of your track in a 90 degree line instead.


(vince829) #23

Diego I did some poking around in the rail gun script and referenced that to the tank script in goldrush. So please tell me if what i did was correct.

I make a script_multiple, textured with common/trigger. I gave it a targetname and scriptname of train_trigger. I gave it a target of train_enabler. I then made a target_script_trigger, gave it targetname and scriptname of tank_enabler. I hoped to accomplish this baby step in order to understand how the triggers worked. I wanted when the allies stepped in the trigger for the train to follow all the splines so i can establish the trigger part.

game_manager
{
spawn
{
wm_set_round_timelimit 30
wm_axis_respawntime 10
wm_allied_respawntime 10

	wait 500
}

}
train
{
spawn
{
wait 300

followspline 0 spln0 50000 length 32 wait // Spawn point

}

trigger train_path // command to follow splines when called for by tank_enabler
{
followspline 0 spln0 100 wait
followspline 0 spln1 100 wait
followspline 0 spln2 100 wait
followspline 0 spln3 100 wait
followspline 0 spln4 100 wait
followspline 0 spln5 100 wait
followspline 0 spln6 100 wait
followspline 0 spln7 100 wait
}
}

train_trigger // my trigger in game
{
spawn
{
wait 500
attachtotag train train // this attaches the trigger to the script mover??I was unsure of the <targetname> <tag> values
}
}

train_enabler // This was the target_script_trigger in game with called for this command.
{
spawn
{
trigger self train_path //When train_enabler was called for by train_trigger in game, this called for train_path
}
}

But in game when I go to where the trigger is, nothing happens. P.S. I fixed the poistion of train by rotating it 90 degrees :slight_smile: Any ideas? I will start working on the switch barracade tomorrow and will let you know what happens. Also I plan on adding a crane


(isbowhten) #24

did the trigger_multiple have an origin?
cause you prbably attached it to that tag wrong if nothing happened.

i would not use the target_Script_trigger.
a trigger mulitple runs in script automatically 3 events
“activate”, “activate allies” and “activate axis”

how much “cabins” does the train have?
i mean, if your train is loooong and the first one goes round a curve, the last one would rotate, too and will be off the track then because your train will always be a line if you dont script their movement for each cabin,
but there is a nice command…
you script the movement for the first tug(i think this is the correct word XD), and in the other tugs you use in the spawn event (after having placed them correct in radiant) “attatchtotrain <targetname>”


(vince829) #25

Could you tell me everything I need to do to make a train follow its splines when a team steps on a trigger in the most basic way? When someone steps off the trigger the train stops. From that I can figure out how to make it go backwards (doing the same thing except reversing the teams and making followspline 1 instead of 0) I know how to make the barriers because essentially it is like the tank part instead a little different. and you already told me how to make make train go around curves.


(Diego) #26

Regarding comparing the Rail Tug script to the Goldrush tank:
To be honest, the goldrush tank script confused the crap out of me. The truck script isn’t much better. All the bitsets and resets give me a headache. For my Tank scripting, I started with Chrucker’s Tutorial script. In my opinion it was a cleaner setup and easier to interpret and build on but the accum setups for it were drastically different than what you get from the goldrush tank.

Regarding your trigger_multiples:
The Rail Gun tug has 2 trigger multiples, one for axis and one for allies. It also has a separate trigger multiple for the trigger_objective_info. You do need origin brushes for these triggers. The origins are set at the hitch that connects the 2 cars. By the way, the attachtotag will only work if you have a tag to attatch too. Without a model for the train, you have no tags. The train script in rail gun uses the followspline command in the spawn stage for these triggers and you have to move those triggers separately.

There are 2 target_script_triggers for axis and allied train enabling and disabling. One is set to be used by axis only, the other by allies only. But both triggers have the same target and scriptnames. Could this have been done with one trigger_multiple using the “activate axis” and “activate allies” commands? Probably. But when it comes to scripting, I don’t want to waste time trying to reinvent the wheel.

In my opinion, since you want the behavior to work exactly like the one in rail gun, you should really use it and not try to start over. If you want to build it from scratch, Isbowhten will be much more help to you. But I can help you interpret things from the original train script if you choose to use it. I can also share with you my own modified train script and entities to get you started.


(vince829) #27

Well, I opened up railgun.map. I made a train with two tugs with separate script_movers. I made two train_triggers for the two trigger_multiples. I modified the railgun script but it still does not work.

game_manager
{
spawn
{
wm_set_round_timelimit 30
wm_axis_respawntime 10
wm_allied_respawntime 10

	wait 500
}

}
train1
{
spawn
{
accum 2 set 0 // is enabled (someone stood in trigger)
accum 4 set 0 // is moving? (1 = moving)
accum 6 set 0 // who’s got the tug? (0 = axis / 1 = allies)

	wait 200
	followspline 0 spln5 200 wait length 224

	playsound sound/vehicles/tug/tug_idle.wav looping
}

// *********************************************
// pre-run scripting
// *********************************************

trigger run_Prestage2
{
	accum 2 abort_if_equal 0

	accum 4 set 1
	trigger train1_trigger run_Prestage2
	trigger train1_back run_Prestage2
	followspline globalaccum 0 spln4 200 wait length 224

	trigger train1 update_counter_axis
	trigger train1 update_counter_allies
	accum 4 set 0

	trigger train1 dispatch_allies
	trigger train1 dispatch_axis
}

trigger run_Prestage3
{
	accum 2 abort_if_equal 0

	accum 4 set 1
	trigger train1_trigger run_Prestage3
	trigger train1_back run_Prestage3
	followspline globalaccum 0 spln3 200 wait length 224

	trigger train1 update_counter_axis
	trigger train1 update_counter_allies
	accum 4 set 0

	trigger train1 dispatch_allies
	trigger train1 dispatch_axis
}

trigger run_Prestage4
{
	accum 2 abort_if_equal 0

	accum 4 set 1
	trigger train1_trigger run_Prestage4
	trigger train1_back run_Prestage4
	followspline globalaccum 0 spln2 200 wait length 224

	trigger train1 update_counter_axis
	trigger train1 update_counter_allies
	accum 4 set 0

	trigger train1 dispatch_allies
	trigger train1 dispatch_axis
}

trigger run_Prestage5
{
	accum 2 abort_if_equal 0

	accum 4 set 1
	trigger train1_trigger run_Prestage5
	trigger train1_back run_Prestage5
	followspline globalaccum 0 spln1 200 wait length 224

	trigger train1 update_counter_axis
	trigger train1 update_counter_allies
	accum 4 set 0

	trigger train1 dispatch_allies
	trigger train1 dispatch_axis
}

trigger run_Prestage6
{
	accum 2 abort_if_equal 0

	accum 4 set 1
	trigger train1_trigger run_Prestage6
	trigger train1_back run_Prestage6
	followspline globalaccum 0 spln0 200 wait length 224

	trigger train1 update_counter_axis
	trigger train1 update_counter_allies
	accum 4 set 0

	trigger train1 dispatch_allies
	trigger train1 dispatch_axis
}

trigger run_Prestage7
{
	accum 2 abort_if_equal 0

	accum 4 set 1
	trigger train1_trigger run_Prestage7
	trigger train1_back run_Prestage7
	followspline globalaccum 0 spln_1 200 wait length 224

	trigger train1 update_counter_axis
	trigger train1 update_counter_allies
	accum 4 set 0

	trigger train1 dispatch_allies
	trigger train1 dispatch_axis
}

trigger run_Prestage8
{
	accum 2 abort_if_equal 0

	accum 4 set 1
	trigger train1_trigger run_Prestage8
	trigger train1_back run_Prestage8
	followspline globalaccum 0 spln_2 200 wait length 224

	trigger train1 update_counter_axis
	trigger train1 update_counter_allies
	accum 4 set 0

	trigger train1 dispatch_allies
	trigger train1 dispatch_axis
}

trigger run_Prestage9
{
	accum 2 abort_if_equal 0

	accum 4 set 1
	trigger train1_trigger run_Prestage9
	trigger train1_back run_Prestage9
	followspline globalaccum 0 spln_3 200 wait length 224

	trigger train1 update_counter_axis
	trigger train1 update_counter_allies
	accum 4 set 0

	trigger train1 dispatch_allies
	trigger train1 dispatch_axis
}

trigger run_Prestage10
{
	accum 2 abort_if_equal 0

	accum 4 set 1
	trigger train1_trigger run_Prestage10
	trigger train1_back run_Prestage10
	followspline globalaccum 0 spln_4 200 wait length 224

	trigger train1 update_counter_axis
	trigger train1 update_counter_allies
	accum 4 set 0

	trigger train1 dispatch_allies
	trigger train1 dispatch_axis
}

trigger train_enable_axis
{
	accum 4 abort_if_equal 1

	accum 6 set 0

	accum 2 set 1
	accum 1 set 0

	trigger train1 dispatch_axis
}

trigger train_enable_allies
{
	accum 4 abort_if_equal 1

	accum 6 set 1

	accum 2 set 2
	accum 1 set 0

	trigger train1 dispatch_allies
}

trigger dispatch_axis
{
	accum 2 abort_if_not_equal 1
	accum 1 abort_if_not_equal 0

	globalaccum 0 set 1

	// construction site to depot (pre-run minus the ammo)
	accum 3 trigger_if_equal -72 train1 run_Prestage2
	accum 3 trigger_if_equal -71 train1 run_Prestage3
	accum 3 trigger_if_equal -70 train1 run_Prestage4
	accum 3 trigger_if_equal -69 train1 run_Prestage5
	accum 3 trigger_if_equal -68 train1 run_Prestage6
	accum 3 trigger_if_equal -67 train1 run_Prestage7
	accum 3 trigger_if_equal -66 train1 run_Prestage8
	accum 3 trigger_if_equal -65 train1 run_Prestage9
	accum 3 trigger_if_equal -64 train1 run_Prestage10
}

trigger dispatch_allies
{
	accum 2 abort_if_not_equal 2
	accum 1 abort_if_not_equal 0

	globalaccum 0 set 0

	// construction site to depot (pre-run minus the ammo)
	accum 3 trigger_if_equal -71 train1 run_Prestage2
	accum 3 trigger_if_equal -70 train1 run_Prestage3
	accum 3 trigger_if_equal -69 train1 run_Prestage4
	accum 3 trigger_if_equal -68 train1 run_Prestage5
	accum 3 trigger_if_equal -67 train1 run_Prestage6
	accum 3 trigger_if_equal -66 train1 run_Prestage7
	accum 3 trigger_if_equal -65 train1 run_Prestage8
	accum 3 trigger_if_equal -64 train1 run_Prestage9
	accum 3 trigger_if_equal -63 train1 run_Prestage10
}

trigger train_disable
{

	accum 1 set 1

	accum 4 trigger_if_equal 0 train1 sound_idle
	// Gordon: This shouldn't be here Tim, as this isnt when the train actually stops
	// Tim: i know, but it does the trick for now :E
}

trigger sound_move
{
	accum 4 abort_if_equal 0
	stopsound
	playsound sound/vehicles/tug/tug_move.wav looping
}

trigger sound_idle
{
	stopsound
	playsound sound/vehicles/tug/tug_idle.wav looping
}

}

train1_controller
{
trigger allied_request
{
accum 1 inc 1
accum 0 set 0
accum 2 set 0

	accum 1 abort_if_less_than 3
	trigger train1 train_enable_allies
	trigger train1 sound_move
}

trigger axis_request
{
	accum 0 inc 1
	accum 1 set 0
	accum 2 set 0

	accum 0 abort_if_less_than 3
	trigger train1 train_enable_axis
	trigger train1 sound_move
}

trigger timer
{
	accum 2 inc 1
	accum 2 abort_if_less_than 3

	accum 0 set 0
	accum 1 set 0

	trigger train1 train_disable
}

}

train1_sound
{
}

train1_trigger
{
spawn
{
wait 200
followspline globalaccum 0 spln5 200 wait length 224
}

trigger run_Prestage2
{
	followspline globalaccum 0 spln4 200 wait length 224
}

trigger run_Prestage3
{
	followspline globalaccum 0 spln3 200 wait length 224
}

trigger run_Prestage4
{
	followspline globalaccum 0 spln2 200 wait length 224
}

trigger run_Prestage5
{
	followspline globalaccum 0 spln1 200 wait length 224
}

trigger run_Prestage6
{
	followspline globalaccum 0 spln_0 200 wait length 224
}

trigger run_Prestage7
{
	followspline globalaccum 0 spln_1 200 wait length 224
}

trigger run_Prestage8
{
	followspline globalaccum 0 spln_2 200 wait length 224
}

trigger run_Prestage9
{
	followspline globalaccum 0 spln_3 200 wait length 224
}

trigger run_Prestage10
{
	followspline globalaccum 0 spln_4 200 wait length 224
}

}

train1_back
{
spawn
{
wait 200
followspline globalaccum 1 spln5 200 wait length -224
}

trigger run_Prestage2
{
	followspline globalaccum 0 spln4 200 wait length -224
}

trigger run_Prestage3
{
	followspline globalaccum 0 spln3 200 wait length -224
}

trigger run_Prestage4
{
	followspline globalaccum 0 spln2 200 wait length -224
}

trigger run_Prestage5
{
	followspline globalaccum 0 spln1 200 wait length -224
}

trigger run_Prestage6
{
	followspline globalaccum 0 spln0 200 wait length -224
}

trigger run_Prestage7
{
	followspline globalaccum 0 spln_1 200 wait length -224
}

trigger run_Prestage8
{
	followspline globalaccum 0 spln_2 200 wait length -224
}

trigger run_Prestage9
{
	followspline globalaccum 0 spln_3 200 wait length -224
}

trigger run_Prestage10
{
	followspline globalaccum 0 spln_4 200 wait length -224
}

}

train1_enabler_axis
{
trigger run
{
trigger train1_controller axis_request
}
}

train1_enabler_allies
{
trigger run
{
trigger train1_controller allied_request
}
}

train1_disabler
{
trigger run
{
trigger train1 train_disable
}
}

Diego if you can’t find anything wrong do you mind if I take a look at your train? I have no idea why this does not work when I got it straight from railgun


(Diego) #28

Just taking a quick glance at it, it looks like you are getting all the right stuff in the script. Are you using all of the same entities in your train that are in the rail gun train? If you don’t have all of the target_script_triggers, and the func_timer it won’t work.

Also, with an unmodified script, for a lame idea, The axis have control over the train at the start, so if you are testing with allies it won’t move anyway.

I’m at work right now. But I’ll get my train stuff online for you tonight to take a look at. My train is setup to be used by the allies instead of the axis. If you need it the other way around, I can show you what to change in the script to put it back to the axis in control like in rail gun.


(vince829) #29

I did try the train while on the axis side but it did not work. I can’t find anything in the script wrong but I am almost sure I did everything in Radiant right. So what I am going to do is take all the train stuff from railgun and move it into a separate map for testing. Then I am not going to edit the script. If I can get it to work then I can start editing things to see what I can and can’t do and figure out what parts of the script I need and which parts I don’t for my own map. I already decompiled railgun but I will do all of this tomorrow. This is a real pain


(Diego) #30

That’s exactly how I started with it. I made a clean map with absolutely only the scripting necessary to move the trains and cranes. Once I knew my test version was working properly I started modifying it. In the interest of simplicity, my final setup is the exact same number of spline points as the original. That made the prestage and normal stage movement easier to work on.

Once you have that working, if you want the train to be an allied offensive movement instead of defensive, these are the things I changed in the script. (Some of my comments are incomplete. Don’t have it all figured out but it works fine):

  1. Switch the Allied an Axis request triggers in the train1_controller:

	trigger allied_request
	{
		accum 0 inc 1	//UNKNOWN: Forces the train1_enabler_axis script to run 3 times before acknowleging the request to move??					
		accum 1 set 0	//UNKNOWN
		accum 2 set 0	//UNKNOWN

		accum 0 abort_if_less_than 3		//Must increment to 3 before acknowleging the request to move the train.
		trigger train1 train_enable_allies	//Checks to see if an allied player is still in the cab requesting to move the train.
		trigger train1 sound_move			//Train movement sound turned on, idle sound turned off.
	}
	
	trigger axis_request
	{
		accum 1 inc 1	//UNKNOWN:	Forces the train1_enabler_axis script to run 3 times before acknowleging the request to move??					
		accum 0 set 0	//UNKNOWN
		accum 2 set 0	//UNKNOWN

		accum 1 abort_if_less_than 3		//Must increment to 3 before acknowleging the request to move the train.
		trigger train1 train_enable_axis	//Checks to see if an axis player is still in the cab requesting to move the train.
		trigger train1 sound_move			//Train movement sound turned on, idle sound turned off.
	}

  1. Switch the Train_enable triggers in the train1 script:

	trigger train_enable_axis
	{
		accum 4 abort_if_equal 1	//If tug is moving, don't continue script.


		accum 6 set 1				//Axis have the tug.
		accum 2 set 2				//An Axis player is in the trigger
		accum 1 set 0				//Train is no longer disabled

		trigger train1 dispatch_axis
	}

		
	trigger train_enable_allies
	{
		accum 4 abort_if_equal 1	//If tug is moving, don't continue script.

		accum 6 set 0				//Allies have the tug.
		accum 2 set 1				//An Allied player is in the trigger
		accum 1 set 0				//Train is no longer disabled


		trigger train1 dispatch_allies
	}

  1. Switch the Dispatch Triggers in the train1 script:

	trigger dispatch_axis
	{
		accum 2 abort_if_not_equal 2
		accum 1 abort_if_not_equal 0

		globalaccum 0 set 0		// <<<<<<<<<<IMPORTANT GLOBAL ACCUM TRAIN DIRECTION: MOVE TO North Crane>>>
//		wm_announce "(running dispatch axis new)"	
		printaccum 3
		// Depot yard to North Crane (pre-run minus the ammo)
		accum 3 trigger_if_equal -71 train1 run_Prestage2
		accum 3 trigger_if_equal -70 train1 run_Prestage3
		accum 3 trigger_if_equal -69 train1 run_Prestage4
		accum 3 trigger_if_equal -68 train1 run_Prestage5 

EDITED FOR SIZE

	trigger dispatch_allies
	{
		accum 2 abort_if_not_equal 1	//Abort if an Allied player is not in the trigger
		accum 1 abort_if_not_equal 0	//Abort if the Train is disabled

		globalaccum 0 set 1		// <<<<<<<<<<IMPORTANT GLOBAL ACCUM TRAIN DIRECTION: MOVE TO DEPOT>>>
//		wm_announce "(running dispatch allies new)"		
		printaccum 3
		// construction site to depot (pre-run minus the ammo)
		accum 3 trigger_if_equal -72 train1 run_Prestage2	//First step in Train movement: If train is at spline 72, run_Prestage2
		accum 3 trigger_if_equal -71 train1 run_Prestage3
		accum 3 trigger_if_equal -70 train1 run_Prestage4
		accum 3 trigger_if_equal -69 train1 run_Prestage5


EDITED FOR SIZE


Compare these settings to the original script. If this doesn’t help, I’ll send you .map files of my train entities and full train script.


(vince829) #31

Hmm, I think I am getting close. Does someone mind checking these out?

http://www.divshare.com/download/6292538-d35 .map file
http://www.divshare.com/download/6292543-512 script file

I checked this with railgun and v2_factory and can’t find out what I did wrong.


(Diego) #32

Sorry, can’t download from that dorky website. It just keeps looping around between the advertisements and the download page. It says I’ve downloaded the file but it never does.


(Diego) #33

[QUOTE=FireFly;184843]I’m not sure if this will help you, because I’m a bit rusty when It comes to script_movers…

I don’t know if you are familiar with the tramfight map, but - while in testing phase - I created the tram model with brushes in gtkradiant ( with an origin brush inside it) and turned this into a script_mover…
Now as far as I remember this caused alot of problems while ingame, for example, in corners the tram would stutter, It wouldn’t go smoothly around the corner… So I decided to save the brushwork as an ASE model, import it into 3dmax, added some more details to the tram, and exported to an MD3 file…
With the MD3 model the tram would go smoothly around the corners no stuttering at all…[/QUOTE]

That was a very interesting idea you had about converting the railgun map to an ASE file. I have never used blender before, so it took me a while to get it to work. I had to install all the python code to get it going. It was very slow to get the conversion, but I was eventually able to make it an .obj file so that I could edit it in Maya.

I did modify the geometry a bit after I got it into Maya, and of course, the the textures are completely different. But I now have .md3 files for both the tug and the cargo car for my map. It still stutters a little on movement at the beginning, but It is better than before. Anyway, I replaced my brushwork train with this new one. This worked out so nice that I’ll be using this technique to convert more of my brushwork scriptmovers to .md3 models such as the cranes and the cargo.


(vince829) #34

Diego is it alright if I see your .map file and your script? I copied a train out of V2_factory that is a little more straight forward then railgun but it still does not work and the triggers or objinfo does not attach to the train.


(Diego) #35

Ok, I’ve got some files setup for you. I’m not sending you my entire map and script but these should get you working. Most of my stuff has been separated out from the main map anyway so I can debug other things.

This is a .map file with my Train spline points:

http://www.badongo.com/file/12856479

This is a .map file with my train entities. This is the brushwork version so you won’t have any of the textures. You might want to delete the limbo cameras out of it. You’ll notice that these entities are a long way from the spline points. That’s the location of my staging area in my map. If you move these entities, make sure you update the origins of everything to the new location or it will get dorked up.

http://www.badongo.com/file/12856482

This is the .SCRIPT file for the train. This is only what you need to get the train moving forward and back. I took out the cranes, the cargo, and the track switch stuff for now. This is set to move Allies on offense. I also noticed that I forgot to mention the spline counters have to be switched as well in orde to do this. I updated the notes in the script file to accommodate that.

http://www.badongo.com/file/12856480


(vince829) #36

Where are the origin brushe(s) for your train? I can’t find any but when i load the map I don’t get “script_mover must have a model” error so it must have one. Also the train shows up on weird places of the map like you said it would if I moved the entities, (I moved the entire train splines from the train). So how do I adjust for this as I can’t find any origin brush, and when I made some origin brushes that didn’t work.


(Diego) #37

It’s possible in my manipulations I had accidentally re-textured the original origin brushes with something else, and then later simply removed them. If you look at each script mover in the entity window (train1, train1_back, all 3 trigger boxes, etc) an origin value is specified in each of them. The file that I sent you has an info_notnull placed at the center of the hitch that joins the train cars. This entity will give you the value for the origin that you need to change all of the script movers and triggers to. It is not attatched to the train at all. I simply used it to get the origin coordinates quickly while I was moving it around in my own map.

I’m not sure if simply adding an origin brush works on script movers. I’m almost positive they used to be there. But since I have each entity hard-coded to a specific origin value, the train was working fine without them. That also probably explains why it didn’t work when you added new ones. Your origin brushes are conflicting with the hard-coded values that are already in the script movers.


(Diego) #38

I did a test with my own train last night. I removed my hard-coded origin values from all of my entities and replaced them with origin brushes at the center of the hitch. The train ran just fine like that. Still has some of that stuttering in it though. Not sure how I’m going to get rid of that. I’m even using the same clip brushes from rail gun and my path is perfectly flat. I think the origin brushes helped smooth it out a little though. The worst stuttering is still at the beginning where the train is running at a 45 degree angle.


(-SSF-Sage) #39

How about trying to tweak the lenght value in the followspline command? Should fix it.


(Diego) #40

All of my length values are the ones from rail gun. I’ve never modified that value before. Is that value supposed to equal the distance between the spline points?