Jump to content
jshock

A3 Cruise Control Script

Recommended Posts

Hello Arma 3 Community,



I bring to you the,

A3 Cruise Control Script


Original Author and point of inspiration

Vehicle Cruise Control Mod

By Allen Kaganovsky

http://kaganovsky.ca

See it here:

http://opendayz.net/threads/vehicle-cruise-control-server-side-script.18583/

Current Modification Author: J.Shock

Note and thanks to DreadedEnitity for debugging.

Modifications: Move from a modded platform to a script/function version.

Allowed cruise control at speed when cruise control was

set (not predefined).


Short Description:

Via scroll-menu action the driver of any car (cars, hunters, etc.), sadly not tanks or boats or air vehicles, can set a speed at which to travel in his vehicle, and still have full turning capabilities!

Use and Limitations:

-Simply get in a vehicle as the driver, speed up to desired speed, scroll-wheel, click "Cruise Control", and there you have it!

-By pressing the "S" key (standard Arma 3 vehicle brake key), like in any real world vehicle will stop the cruise control so you can then drive like normal.

-The script won't allow the player to set the cruise control unless he is above 30 km/h.

Download:

news_download_a3_3.png

In your mission folder and files:

Place the "SHK_cruise" folder in the main body of your mission folder.

In your init.sqf:

[] call SHK_fnc_cruiseSpawn;

In your description.ext:

class CfgFunctions
{
#include "SHK_cruise\cfgfunctions.hpp"
};

And that's it! Hope the community can enjoy and appreciate this script :D.


Changelog:

v1.0.1

>>Moved speed condition from while loop to addAction condition.

v1.0

>>First Release


Edited by JShock
  • Thanks 1

Share this post


Link to post
Share on other sites

Good idea. Thanks for contributing this.

Why not allow a slower speed for zodiac boats?

As a player it really annoys me that I can't drive the zodiac very slowly which has a reduced motor sound, for a quieter insertion.

Share this post


Link to post
Share on other sites
Good idea. Thanks for contributing this.

Why not allow a slower speed for zodiac boats?

As a player it really annoys me that I can't drive the zodiac very slowly which has a reduced motor sound, for a quieter insertion.

That is because this script is focused on the vehicle class "Cars", I can later implement boats, should the rest of the community also desire such a feature :p.

Share this post


Link to post
Share on other sites

Nice one, will definitely check this one out! A cruise control was actually gonna be my next but one project, kind of glad you beat me to it :)

Looking forward to using it instead of existing speed limiter.

Share this post


Link to post
Share on other sites

JShock and I were talking about this, glad to see it finished. I may post my version in a code snippet later.

Share this post


Link to post
Share on other sites
Nice one, will definitely check this one out! A cruise control was actually gonna be my next but one project, kind of glad you beat me to it :)

Looking forward to using it instead of existing speed limiter.

Yeah got extremely bored last night, and here 24hrs later, that's all she wrote. Sorry for stealing your future thunder :p.

Share this post


Link to post
Share on other sites

Nice, but when you try to activate while going too slow, you lose the addAction and have to exit & re-enter the vehicle to get it back...

Share this post


Link to post
Share on other sites
Nice, but when you try to activate while going too slow, you lose the addAction and have to exit & re-enter the vehicle to get it back...

Well if you read the post above the lowest you should be able to activate is 30km/h, and you should be able to just press "S" to restart the cruise control, you shouldn't have to get out of the vehicle. If the issue persists, let me know.

Disregard, was able to replicate your results, and have updated the script to reflect these changes:


UPDATE:

v1.0.1

>>Moved speed condition from while loop to addAction condition.

Edited by JShock

Share this post


Link to post
Share on other sites

Damn.

You beat me to it. My cruise control script was almost working just had the issue of making the vehicle turn but instead it would roll. xD

Share this post


Link to post
Share on other sites
Guest

Thank you very much for informing us of the release :cool:

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites
Damn.

You beat me to it. My cruise control script was almost working just had the issue of making the vehicle turn but instead it would roll. xD

I had mine "float" drifting there for a while :p.

Share this post


Link to post
Share on other sites

Is there anything else, other than the addition of boats, that this script needs, any other features you guys would like to see?

Share this post


Link to post
Share on other sites

When planning my own version I was aiming to include small incremental or decremental adjustments to the set cruise level, like on a real car. For example, if you don't hit it spot on at 55kph you could adjust up or down a few kph till you were.

Share this post


Link to post
Share on other sites
When planning my own version I was aiming to include small incremental or decremental adjustments to the set cruise level, like on a real car. For example, if you don't hit it spot on at 55kph you could adjust up or down a few kph till you were.

The mod version that I was using as basically a template, did something like that except that if you were in "x" range then just set the cruise at whatever, i.e. if you were traveling at 50-65kph and set the cruise it would set the speed at 60kph. I didn't really like that dynamic, but I think your talking more of setting the cruise and then having the ability to add/reduce speed during travel without turning it off and then back on at the desired speed.

Edited by JShock

Share this post


Link to post
Share on other sites

Your latter statement is absolutely correct. That's how it works on my car irl, useful if you're setting cruise control for legal speed limits as opposed to just cruising. And equally useful when synching speed in game for convoy vehicles.

Share this post


Link to post
Share on other sites

Just a thought, John.... Shuko's stuff is usually released using the SHK tag. There is the potential for confusion here.

Share this post


Link to post
Share on other sites
Just a thought, John.... Shuko's stuff is usually released using the SHK tag. There is the potential for confusion here.

I'm fully aware, I believe this is the last of my scripts that has that issue, there may be one other, but I just haven't had the motivation/time to update anything, and TBH other than the people who know scripting and such well I don't think the general population really looks at the function tags (I could be wrong), they just want the feature, whatever it may be. Cause I know back in the day I would look at the author, and the implementation, nothing else really mattered :p.

Share this post


Link to post
Share on other sites

I'm terribly sorry, but the instructions of:

"In your mission folder and files:

Place the "SHK_cruise" folder in the main body of your mission folder."

Don't make much sense to me - where exactly will I find this mission folder, and then where will I place the init.sqf etc? Is it in an exported Scenario?

 

Thanks!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×