Posted by: SUPER-G - Tuesday, May 8, 2012 8:28:40 AM
when i put in cars for a generals map they always go really fast, often now turning corners right and going off the road. it really makes my map look less good. is there a way that i can limit the speed on cars?

Posted by: VTULCobra - Tuesday, May 8, 2012 9:21:10 AM
I believe you have to change that by changing the locomotor speed in a map.ini.

Posted by: SUPER-G - Tuesday, May 8, 2012 4:34:50 PM
how do i do that?

Posted by: VTULCobra - Tuesday, May 8, 2012 4:48:10 PM
I'm sorry but I don't really know how to do it, just that you can do it. Though I know, which I think you do too, that you have to add a map.ini in the map folder and then place the locomotor code for your specific unit and change it's speed. I'm not familiar with this sort of thing so I'd recommend you to be patient and wait until someone who knows replies to the thread.

Posted by: cgf123` - Wednesday, May 9, 2012 4:10:13 AM
is your problem that the cars go off the road, or just that they go too fast? because honestly speed doesnt make any difference to the way it turns (in generals that is... ofcourse in real life a faster moving car will have a larger turn radius) anyways, to change the car's locomotor settings just create a map.ini file in your map's folder, and paste this inside it: [code] Locomotor BasicCarLocomotor Surfaces = GROUND Speed = 90 ; in dist/sec SpeedDamaged = 90 ; in dist/sec TurnRate = 120 ; in degrees/sec TurnRateDamaged = 120 ; in degrees/sec Acceleration = 30 ; in dist/(sec^2) AccelerationDamaged = 30 ; in dist/(sec^2) Braking = 50 ; in dist/(sec^2) MinTurnSpeed = 40 ; in dist/sec TurnPivotOffset = -0.5 ; where to pivot when turning (-1.0 = rear, 0.0 = center, 1.0 = front) ZAxisBehavior = NO_Z_MOTIVE_FORCE Appearance = FOUR_WHEELS AccelerationPitchLimit = 6 ; Angle limit how far chassis will lift or roll from acceleration. BounceAmount = 0 ; simulates hitting random rocks. 0==smooth pavement, 200 = bumpy. PitchStiffness = 0.1 ; stiffness of the "springs" in the suspension forward & back. RollStiffness = 0.05 ; stiffness of the "springs" in the suspension side to side. PitchDamping = 0.5 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain. RollDamping = 0.5 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain. ForwardAccelerationPitchFactor = 0.3 ; How much acceleration will cause the front to lift, or dip for stops. LateralAccelerationRollFactor = 0.2 ; How much cornering will cause the chassis to roll. End [/code] this the default car locomotor (as in locomotor.ini extracted from the INI.big). if you want to change its speed, simply edit its 'Speed' and 'SpeedDamaged' values. PS- may be a good idea to remove all the attributes you wont be editing... for whatever reason ive noticed a few of them can cause map crashes sometimes. So essentially you could just do: [code] Locomotor BasicCarLocomotor Surfaces = GROUND Speed = 50 ; in dist/sec SpeedDamaged = 50 ; in dist/sec End [/code]

Posted by: i^love^mixery - Wednesday, May 9, 2012 6:27:51 AM
[quote=cgf123`;124308]because honestly speed doesnt make any difference to the way it turns (in generals that is... ofcourse in real life a faster moving car will have a larger turn radius)[/quote] thats not right. i just tested it: if you increase the speed then the turning radius will increase too. but your code is right of course and it works well[grin]

Posted by: SUPER-G - Wednesday, May 9, 2012 8:21:31 AM
wow thanks guys for your help![grin]

Posted by: SUPER-G - Saturday, May 12, 2012 11:01:35 AM
but how do i make a map.ini file?

Posted by: Annihilationzh - Saturday, May 12, 2012 11:39:23 AM
[quote]because honestly speed doesnt make any difference to the way it turns (in generals that is... ofcourse in real life a faster moving car will have a larger turn radius)[/quote] I hope you mean that in generals a car can turn on the spot if coded to, because when using dist/sec and degrees/sec, increasing either will change it's turning circle. [quote]but how do i make a map.ini file?[/quote] Create a txt file and change the extension to ini. Then place any code in there.

Posted by: SUPER-G - Saturday, May 12, 2012 12:29:33 PM
[quote]Create a txt file and change the extension to ini. Then place any code in there.[/quote] how do i change the extension

Posted by: Annihilationzh - Saturday, May 12, 2012 12:56:00 PM
Tutorial here: http://www.mediacollege.com/microsoft/windows/extension-change.html Or a more general one here: http://www.computerhope.com/issues/ch000428.htm Or you can just google 'change file extension.'

Posted by: SUPER-G - Saturday, May 12, 2012 3:02:04 PM
[grin] [img]https://www.cnclabs.com/forums/images/emoticons/gwicon_gunsmilie.gif[/img] wow it worked thanks again!