Posted by: fleetatks - Wednesday, August 9, 2006 5:14:21 PM
I'm having trouble using the "adding trains to your map; very slow train has garrison-able train cars" tutorial on your main page, My map works fine but when I put the Map.ini into the map it crashes before it can load, this usually happens when something is wrong with the scripts or the .ini files inside the map. I'm positive it's not anything to do with scripts or my map, but think that either A:The coding was designed for C&C gens reg, or B: The formatting is wrong (if that is even possible) because when I paste into notepad it looks all wrong, but looks fine inside wordpad (with auto format.) The code is below for reference. All help is apreciated :)
[code]Object TrainEngineVerySlow
ReplaceModule ModuleTag_03
Behavior = RailroadBehavior ModuleTag_03_Override
PathPrefixName = Railroad
RunningGarrisonSpeedMax = 8
KillSpeedMin = 9
Friction = 0.995
BigMetalBounceSound = BuildingFallingMetal
SmallMetalBounceSound = VehicleImpactHeavy
MeatyBounceSound = InfantryCrush
ClicketyClackSound = TrainClicketyClack
WhistleSound = TrainWhistle
IsLocomotive = Yes
SpeedMax = 8.0
Acceleration = 1.005
WaitAtStationTime = 20000 ; twenty seconds
Braking = 0.97
CrashFXTemplateName = SpecialEffectsTrainCrashObject
CarriageTemplateName = TrainCar03
CarriageTemplateName = TrainCar03
CarriageTemplateName = TrainCar03
CarriageTemplateName = TrainCar03
CarriageTemplateName = TrainCarFlat
CarriageTemplateName = TrainCarRocket
CarriageTemplateName = TrainCarFlat
CarriageTemplateName = TrainCarFlat
CarriageTemplateName = TrainCar03
CarriageTemplateName = TrainCar03
CarriageTemplateName = TrainCab
End
EndEnd
Object TrainCar03
ReplaceModule ModuleTag_02
Body = ActiveBody ModuleTag_02_Override
MaxHealth = 10000.0
InitialHealth = 10000.0
End
End
AddModule ModuleTag_03_Override
Behavior = GarrisonContain ModuleTag_03
ContainMax = 10
AllowInsideKindOf = INFANTRY VEHICLE
EnterSound = GarrisonEnter
ExitSound = GarrisonExit
DamagePercentToUnits = 50%
MobileGarrison = Yes
End
End
ReplaceModule ModuleTag_04
Behavior = RailroadBehavior ModuleTag_04_Override
IsLocomotive = No
PathPrefixName = Railroad
RunningGarrisonSpeedMax = 8
KillSpeedMin = 9
Friction = 0.995
BigMetalBounceSound = BuildingFallingMetal
SmallMetalBounceSound = VehicleImpactHeavy
MeatyBounceSound = InfantryCrush
ClicketyClackSound = TrainClicketyClack
End
End
End
Object TrainCab
ReplaceModule ModuleTag_02
Body = ActiveBody ModuleTag_02_Override
MaxHealth = 10000.0
InitialHealth = 10000.0
End
End
AddModule ModuleTag_03_Override
Behavior = GarrisonContain ModuleTag_03
ContainMax = 10
EnterSound = GarrisonEnter
ExitSound = GarrisonExit
DamagePercentToUnits = 50%
MobileGarrison = Yes
End
End
ReplaceModule ModuleTag_04
Behavior = RailroadBehavior ModuleTag_04_Override
IsLocomotive = No
PathPrefixName = Railroad
RunningGarrisonSpeedMax = 8
KillSpeedMin = 9
Friction = 0.995
BigMetalBounceSound = BuildingFallingMetal
SmallMetalBounceSound = VehicleImpactHeavy
MeatyBounceSound = InfantryCrush
ClicketyClackSound = TrainClicketyClack
End
EndEnd[/code]
[EDIT: Formatting corrected to preserve forum layout -- CommieDog]
Posted by: CommieDog - Thursday, August 10, 2006 4:40:49 PM
There are two instances in your code where there are two End blocks adjoined without whitespace in between them. It they are also present in Map.ini, then they would certainly cause a runtime error when loaded.
Posted by: fleetatks - Friday, August 11, 2006 6:49:35 AM
Hmmm... The 2 conjoined Ends were not present in my map.ini , but I decided to copy and paste the re formatting that you did and they appeared, and it looked like it should (not all the words started at the very left, but had spaces at the beginning of them) So I put a space (enter) between them and it still didn't work, Which makes me think that somehow being transfered from notepad to the tutorial on the website messed up the code in a way were there were errors that can't be seen. Try copy & pasting the code from the site to notepad and see what I'm talking about. (P.S. sorry about the super wide formatting, I'm not sure how that happenned)
Posted by: fleetatks - Saturday, August 12, 2006 3:46:34 PM
Could I be able to just place a "Train engine no cars" and a couple of cars and the "caboos 3" and it will be towed by the train engine? Or does each one have it's own locomotor and will go on the rail road if I place them on a waypoint? My plan is to do that, if you can't help me with the map.ini, and do some scripting to make it stop at the stations & evacuate the troops inside then 2 mins later start again. Will I need to make them subrutine if I do the script method?
P.S.I don't like to double post, but I think you will not notice this if it doesn't get bumped.